Spaces:
Running
Running
File size: 2,023 Bytes
53ea588 |
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 |
FROM langchain/langgraph-api:3.11
RUN pip install --upgrade pip
COPY ace_base_agent/requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
# -- Adding non-package dependency agents --
ADD . /deps/__outer_agents/src
RUN set -ex && \
for line in '[project]' \
'name = "agents"' \
'version = "0.1"' \
'[tool.setuptools.package-data]' \
'"*" = ["**/*"]' \
'[build-system]' \
'requires = ["setuptools>=61"]' \
'build-backend = "setuptools.build_meta"'; do \
echo "$line" >> /deps/__outer_agents/pyproject.toml; \
done
# -- End of non-package dependency agents --
# -- Installing all local dependencies --
RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
# -- End of local dependencies install --
ENV LANGSERVE_GRAPHS='{"ace-base-agent": "/deps/__outer_agents/src/ace_base_agent/ace_base_agent.py:agent"}'
# -- Ensure user deps didn't inadvertently overwrite langgraph-api
RUN mkdir -p /api/langgraph_api /api/langgraph_runtime /api/langgraph_license && touch /api/langgraph_api/__init__.py /api/langgraph_runtime/__init__.py /api/langgraph_license/__init__.py
RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir --no-deps -e /api
# -- End of ensuring user deps didn't inadvertently overwrite langgraph-api --
# -- Removing build deps from the final image ~<:===~~~ --
RUN pip uninstall -y pip setuptools wheel
RUN rm -rf /usr/local/lib/python*/site-packages/pip* /usr/local/lib/python*/site-packages/setuptools* /usr/local/lib/python*/site-packages/wheel* && find /usr/local/bin -name "pip*" -delete || true
RUN rm -rf /usr/lib/python*/site-packages/pip* /usr/lib/python*/site-packages/setuptools* /usr/lib/python*/site-packages/wheel* && find /usr/bin -name "pip*" -delete || true
RUN uv pip uninstall --system pip setuptools wheel && rm /usr/bin/uv /usr/bin/uvx
WORKDIR /deps/__outer_agents/src |