Files
copilotkit__copilotkit/examples/Dockerfile.agent-js
T
Markus Ecker 2546e95438 Make the crew dependency optional (#1468)
Co-authored-by: Suhas Deshpande <suhas2u@gmail.com>
2025-03-11 11:26:38 -07:00

38 lines
979 B
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 .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"]