forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.agent
More file actions
28 lines (20 loc) · 826 Bytes
/
Copy pathDockerfile.agent
File metadata and controls
28 lines (20 loc) · 826 Bytes
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
FROM public.ecr.aws/docker/library/python:3.12.0-slim-bullseye
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
ARG APP_DIR
ARG WITH_LOCAL_DEPS
ENV POETRY_VIRTUALENVS_CREATE=false
# Install poetry and configure it in a single layer
RUN pip install poetry && \
poetry config virtualenvs.create false
RUN pip install -U "langgraph-cli[inmem]"
# Copy only poetry files first
COPY ${APP_DIR}/pyproject.toml ${APP_DIR}/poetry.lock ./
# Copy SDK and install dependencies in a single layer
COPY sdk-python/ /opt/sdk-python
WORKDIR /asset
RUN poetry install --no-interaction --no-ansi
RUN if [ "$WITH_LOCAL_DEPS" = "true" ]; then poetry add /opt/sdk-python; fi
# Copy application code last
COPY ${APP_DIR}/ ./
RUN mkdir .langgraph_api
CMD ["poetry", "run", "demo"]