Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docker/automodel/Dockerfile.nmp-automodel-tasks
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ RUN mkdir -p /home/${USERNAME}/.cache && \

# /app/pyproject.toml is pyproject.workspace.toml (see Dockerfile.platform-workspace).
# --inexact: keep PyTorch / Automodel packages already in the base venv; add nmp-automodel + deps.
# nmp-models is only needed for the model_spec task/parallelism helper here; install
# it without resolving the full models-service deployment backend dependency graph.
ENV UV_LINK_MODE=copy \
UV_PROJECT_ENVIRONMENT=${VIRTUAL_ENV}

RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --package nmp-automodel --package nmp-models --no-dev --inexact
uv sync --package nmp-automodel --no-dev --inexact && \
uv pip install --python ${VIRTUAL_ENV}/bin/python --no-cache --no-deps --no-sources \
-e /app/services/core/models

ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
ENTRYPOINT ["/opt/venv/bin/python"]
Expand Down
3 changes: 2 additions & 1 deletion docker/automodel/Dockerfile.platform-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ COPY docker/automodel/no_override_requirements.txt docker/automodel/no_override_
COPY docs docs
COPY openapi openapi
COPY packages/nmp_build_tools packages/nmp_build_tools
COPY packages/models packages/models
COPY packages/nmp_common packages/nmp_common
COPY packages/nmp_customization_common packages/nmp_customization_common
COPY packages/nemo_platform_plugin packages/nemo_platform_plugin
COPY sdk/python/nemo-platform sdk/python/nemo-platform
COPY services/automodel services/automodel
# Copied for the tasks image only. It is installed outside the reduced uv
# workspace to avoid pulling the full models-service deployment backend graph.
COPY services/core/models services/core/models
4 changes: 0 additions & 4 deletions docker/automodel/pyproject.workspace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,17 @@ constraint-dependencies = ["greenlet>=3.0.0,<3.5"]
[tool.uv.workspace]
members = [
"packages/nmp_build_tools",
"packages/models",
"sdk/python/nemo-platform",
"packages/nemo_platform_plugin",
"packages/nmp_common",
"packages/nmp_customization_common",
"services/automodel",
"services/core/models",
]

[tool.uv.sources]
nmp-build-tools = { workspace = true }
models = { workspace = true }
nemo-platform-sdk = { workspace = true }
nemo-platform-plugin = { workspace = true }
nmp-common = { workspace = true }
nmp-customization-common = { workspace = true }
nmp-automodel = { workspace = true }
nmp-models = { workspace = true }