Files
copilotkit__copilotkit/examples/Dockerfile.agent-js
2025-03-25 22:02:29 -07:00

40 lines
1.0 KiB
Docker

# syntax=docker/dockerfile:1-labs
FROM public.ecr.aws/docker/library/node:22-slim AS production
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.9.0 /lambda-adapter /opt/extensions/lambda-adapter
# ENV HOME="/tmp"
ENV PNPM_HOME="/tmp/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN corepack prepare pnpm@9.15.0 --activate
RUN apt-get update && apt-get install curl -y
# First install via pnpx
RUN pnpx @langchain/langgraph-cli --help
ARG APP_DIR
# WORKDIR /tmp
RUN touch .env
# Copy only poetry files first
COPY ${APP_DIR}/package.json ${APP_DIR}/pnpm-lock.yaml ./
RUN pnpm i --frozen-lockfile
# Copy SDK and install dependencies in a single layer
COPY ${APP_DIR}/ ./
# Explicitly install the missing dependency
RUN pnpm add @langchain/langgraph-checkpoint
RUN mkdir /tmp/.langgraph_api
ENV LANGGRAPH_API_DIR="/tmp/.langgraph_api"
RUN ls -la
# CMD ["/bin/sh", "-c", "ls -la"]
CMD ["/bin/sh", "-c", "pnpx @langchain/langgraph-cli dev --config=langgraph.json --no-browser --port 8000 --host 0.0.0.0"]