Files
copilotkit__copilotkit/examples/Dockerfile.agent-python
T
2025-01-30 19:14:11 -06:00

27 lines
730 B
Docker

FROM public.ecr.aws/docker/library/python:3.12.0-slim-bullseye
ARG APP_DIR
ARG WITH_LOCAL_DEPS
ENV POETRY_VIRTUALENVS_CREATE=false
RUN apt-get update && apt-get install curl -y
# Install poetry and configure it in a single layer
RUN pip install poetry==1.7.1 && \
poetry config virtualenvs.create false
# 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"]