mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
40 lines
1.1 KiB
Docker
40 lines
1.1 KiB
Docker
FROM public.ecr.aws/docker/library/python:3.12-bookworm
|
|
|
|
# Add Lambda adapter (if needed)
|
|
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
|
|
|
|
# Build arguments
|
|
ARG APP_DIR
|
|
ARG WITH_LOCAL_DEPS
|
|
|
|
# Disable Poetry virtualenv creation
|
|
ENV POETRY_VIRTUALENVS_CREATE=false
|
|
|
|
# Install Poetry
|
|
RUN pip install poetry
|
|
|
|
# Copy SDK first and install it in editable mode
|
|
COPY sdk-python/ /opt/sdk-python
|
|
WORKDIR /opt/sdk-python
|
|
RUN pip install -e .
|
|
|
|
# Create working directory
|
|
WORKDIR /asset
|
|
|
|
# Copy pyproject + poetry.lock (if present) first for dependency caching
|
|
COPY ${APP_DIR}/pyproject.toml ${APP_DIR}/poetry.lock* ./
|
|
|
|
RUN pip install -U "langgraph-cli[inmem]>=0.3.3"
|
|
RUN pip install "crewai==0.118.0" "crewai-tools>=0.42.2" --force-reinstall
|
|
RUN pip install "pydantic>=2.7.4,<3.0.0"
|
|
# Install all other dependencies using Poetry
|
|
RUN poetry install --no-root
|
|
|
|
# Now copy the rest of the agent source
|
|
COPY ${APP_DIR}/ ./
|
|
|
|
# Make langgraph API directory if needed
|
|
RUN mkdir -p .langgraph_api
|
|
|
|
# Run the demo script (defined in pyproject.toml)
|
|
CMD ["poetry", "run", "demo"] |