forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.agent-python
More file actions
40 lines (29 loc) · 1.09 KB
/
Copy pathDockerfile.agent-python
File metadata and controls
40 lines (29 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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"]