"...ssh:/git@developer.sourcefind.cn:2222/OpenDAS/dynamo.git" did not exist on "07db589583928dbebc3fa62ba7d4037246e78fb3"
Unverified Commit 59d32d25 authored by Alec's avatar Alec Committed by GitHub
Browse files

build(container): remove planner deps from non-planner images [DYN-2540] (#7748)

parent 492acd03
......@@ -12,9 +12,7 @@ import pytest
from dynamo.llm import EngineType, EntrypointArgs, MockEngineArgs
MODULE_PATH = (
Path(__file__).resolve().parents[2] / "components/src/dynamo/mocker/config.py"
)
MODULE_PATH = Path(__file__).resolve().parents[2] / "config.py"
SPEC = importlib.util.spec_from_file_location("dynamo_mocker_config", MODULE_PATH)
assert SPEC is not None
assert SPEC.loader is not None
......
......@@ -11,6 +11,8 @@ httpx==0.28.1
# Video generation: encode frames to MP4 (used by TRT-LLM, vLLM-Omni, SGLang diffusion)
imageio>=2.37.0
imageio-ffmpeg>=0.6.0
# Shared plotting utility used by runtime diagnostics and benchmark tooling.
matplotlib==3.10.7
msgpack==1.1.2
msgspec==0.19.0
nvidia-ml-py<=13.580.65 # NVIDIA/CUDA related, may vary by driver version
......
......@@ -8,7 +8,6 @@ aiofiles<=25.1.0
filterpy==1.4.5
kubernetes==32.0.1
kubernetes_asyncio==32.0.0
matplotlib==3.10.7
pmdarima==2.1.1
prometheus-api-client==0.6.0
prophet==1.2.1
......
......@@ -3,6 +3,8 @@
# Test-only dependencies — installed in test and dev containers, NOT in runtime.
# For deploy/utils async file IO used by deploy tests and profiler deployment helpers
aiofiles<=25.1.0
# For MinIO/S3 operations in LoRA tests (replaces AWS CLI dependency)
boto3==1.42.4
boto3-stubs[s3]==1.42.9 # Type stubs for boto3 S3 client
......@@ -12,7 +14,6 @@ filelock==3.25.1
# For Kubernetes operations in deploy tests
kr8s==0.20.13
kubernetes_asyncio==32.0.0
matplotlib==3.10.7
matplotlib-stubs
mistral-common>=1.10.0
mypy==1.18.2
......
......@@ -153,7 +153,6 @@ RUN --mount=type=bind,source=./container/deps/requirements.common.txt,target=/tm
ARG WORKSPACE_DIR=/workspace
WORKDIR ${WORKSPACE_DIR}
COPY --chmod=775 --chown=dynamo:0 ./ ${WORKSPACE_DIR}/
RUN chmod g+w ${WORKSPACE_DIR}
ARG DYNAMO_COMMIT_SHA
ENV DYNAMO_COMMIT_SHA=$DYNAMO_COMMIT_SHA
......
......@@ -120,16 +120,14 @@ RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \
COPY --chmod=775 --chown=dynamo:0 benchmarks/ /workspace/benchmarks/
{% endif %}
# Install runtime dependencies (common + planner + benchmarks) as root.
# Install runtime dependencies (common + benchmarks) as root.
# Test and dev dependencies are NOT installed here — they go in the test and dev images.
RUN --mount=type=bind,source=container/deps/requirements.common.txt,target=/tmp/deps/requirements.common.txt \
--mount=type=bind,source=container/deps/requirements.planner.txt,target=/tmp/deps/requirements.planner.txt \
--mount=type=bind,source=container/deps/requirements.benchmark.txt,target=/tmp/deps/requirements.benchmark.txt \
--mount=type=cache,target=/root/.cache/pip,sharing=locked \
export PIP_CACHE_DIR=/root/.cache/pip && \
pip install --break-system-packages \
--requirement /tmp/deps/requirements.common.txt \
--requirement /tmp/deps/requirements.planner.txt \
--requirement /tmp/deps/requirements.benchmark.txt \
sglang==${SGLANG_VERSION} && \
#TODO: Temporary change until upstream sglang runtime image is updated
......@@ -167,12 +165,14 @@ RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \
# Switch back to dynamo user after package installations
USER dynamo
# Copy tests, deploy and components for CI with correct ownership
# Copy tests, deploy, and the sglang/common/mocker component subtrees for CI.
# Pattern: COPY --chmod=775 <path>; chmod g+w <path> done later as root because COPY --chmod only affects <path>/*, not <path>
COPY --chmod=775 --chown=dynamo:0 tests /workspace/tests
COPY --chmod=775 --chown=dynamo:0 examples /workspace/examples
COPY --chmod=775 --chown=dynamo:0 deploy /workspace/deploy
COPY --chmod=775 --chown=dynamo:0 components/ /workspace/components/
COPY --chmod=775 --chown=dynamo:0 components/src/dynamo/common /workspace/components/src/dynamo/common
COPY --chmod=775 --chown=dynamo:0 components/src/dynamo/sglang /workspace/components/src/dynamo/sglang
COPY --chmod=775 --chown=dynamo:0 components/src/dynamo/mocker /workspace/components/src/dynamo/mocker
COPY --chmod=775 --chown=dynamo:0 recipes/ /workspace/recipes/
# Enable forceful shutdown of inflight requests
......
......@@ -266,11 +266,10 @@ RUN --mount=type=cache,target=/home/dynamo/.cache/uv,uid=1000,gid=0,mode=0775 \
if [ -n "$GMS_WHEEL" ]; then uv pip install "$GMS_WHEEL"; fi; \
fi
# Install runtime dependencies (common + planner + benchmarks).
# Install runtime dependencies (common + benchmarks).
# Test and dev dependencies are NOT installed here — they go in the test and dev images.
# --no-cache is intentional: mixed indexes (PyPI + PyTorch CUDA wheels) risk serving stale/wrong-variant cached wheels
RUN --mount=type=bind,source=./container/deps/requirements.common.txt,target=/tmp/requirements.common.txt \
--mount=type=bind,source=./container/deps/requirements.planner.txt,target=/tmp/requirements.planner.txt \
--mount=type=bind,source=./container/deps/requirements.benchmark.txt,target=/tmp/requirements.benchmark.txt \
export UV_GIT_LFS=1 UV_HTTP_TIMEOUT=300 UV_HTTP_RETRIES=5 && \
uv pip install \
......@@ -278,7 +277,6 @@ RUN --mount=type=bind,source=./container/deps/requirements.common.txt,target=/tm
--index-strategy unsafe-best-match \
--extra-index-url https://download.pytorch.org/whl/cu130 \
--requirement /tmp/requirements.common.txt \
--requirement /tmp/requirements.planner.txt \
--requirement /tmp/requirements.benchmark.txt \
cupy-cuda13x && \
# nvidia-cutlass-dsl-libs-base==4.4.1 (transitive dep) ships a stub cute/experimental/__init__.py
......@@ -286,12 +284,14 @@ RUN --mount=type=bind,source=./container/deps/requirements.common.txt,target=/tm
# (pinned by TRT-LLM) works without cute/experimental/. Remove the stub to fix the NotImplementedError.
rm -rf ${VIRTUAL_ENV}/lib/python${PYTHON_VERSION}/site-packages/nvidia_cutlass_dsl/python_packages/cutlass/cute/experimental/
# Copy tests, deploy and components for CI with correct ownership
# Copy tests, deploy, and the trtllm/common/mocker component subtrees for CI.
# Pattern: COPY --chmod=775 <path>; chmod g+w <path> done later as root because COPY --chmod only affects <path>/*, not <path>
COPY --chmod=775 --chown=dynamo:0 tests /workspace/tests
COPY --chmod=775 --chown=dynamo:0 examples /workspace/examples
COPY --chmod=775 --chown=dynamo:0 deploy /workspace/deploy
COPY --chmod=775 --chown=dynamo:0 components/ /workspace/components/
COPY --chmod=775 --chown=dynamo:0 components/src/dynamo/common /workspace/components/src/dynamo/common
COPY --chmod=775 --chown=dynamo:0 components/src/dynamo/trtllm /workspace/components/src/dynamo/trtllm
COPY --chmod=775 --chown=dynamo:0 components/src/dynamo/mocker /workspace/components/src/dynamo/mocker
COPY --chmod=775 --chown=dynamo:0 recipes/ /workspace/recipes/
# Setup launch banner in common directory accessible to all users
......
......@@ -335,27 +335,27 @@ RUN if [ "${ENABLE_MODELEXPRESS_P2P}" = "true" ]; then \
fi
{% endif %}
# Install runtime dependencies (common + vllm-specific + planner + benchmarks).
# Install runtime dependencies (common + vllm-specific + benchmarks).
# Test and dev dependencies are NOT installed here — they go in the test and dev images.
RUN --mount=type=bind,source=./container/deps/requirements.common.txt,target=/tmp/requirements.common.txt \
--mount=type=bind,source=./container/deps/requirements.vllm.txt,target=/tmp/requirements.vllm.txt \
--mount=type=bind,source=./container/deps/requirements.planner.txt,target=/tmp/requirements.planner.txt \
--mount=type=bind,source=./container/deps/requirements.benchmark.txt,target=/tmp/requirements.benchmark.txt \
--mount=type=cache,target=/home/dynamo/.cache/uv,uid=1000,gid=0,mode=0775 \
export UV_CACHE_DIR=/home/dynamo/.cache/uv UV_GIT_LFS=1 UV_HTTP_TIMEOUT=300 UV_HTTP_RETRIES=5 && \
uv pip install \
--requirement /tmp/requirements.common.txt \
--requirement /tmp/requirements.vllm.txt \
--requirement /tmp/requirements.planner.txt \
--requirement /tmp/requirements.benchmark.txt
# Copy tests, deploy and components for CI with correct ownership
# Copy tests, deploy, lib, and the vllm/common/mocker component subtrees for CI.
# Pattern: COPY --chmod=775 <path>; chmod g+w <path> done later as root because COPY --chmod only affects <path>/*, not <path>
COPY --chmod=775 --chown=dynamo:0 tests /workspace/tests
COPY --chmod=775 --chown=dynamo:0 examples /workspace/examples
COPY --chmod=775 --chown=dynamo:0 deploy /workspace/deploy
COPY --chmod=775 --chown=dynamo:0 recipes/ /workspace/recipes/
COPY --chmod=775 --chown=dynamo:0 components/ /workspace/components/
COPY --chmod=775 --chown=dynamo:0 components/src/dynamo/common /workspace/components/src/dynamo/common
COPY --chmod=775 --chown=dynamo:0 components/src/dynamo/vllm /workspace/components/src/dynamo/vllm
COPY --chmod=775 --chown=dynamo:0 components/src/dynamo/mocker /workspace/components/src/dynamo/mocker
COPY --chmod=775 --chown=dynamo:0 lib/ /workspace/lib/
# Setup launch banner in common directory accessible to all users
......
......@@ -139,17 +139,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
/opt/dynamo/wheelhouse/nixl/nixl*.whl \
&& rm -rf /opt/dynamo/wheelhouse
# Install runtime dependencies (common + vllm-specific + planner + benchmarks) and test dependencies
# Install runtime dependencies (common + vllm-specific + benchmarks) and test dependencies
COPY container/deps/requirements.common.txt /tmp/requirements.common.txt
COPY container/deps/requirements.vllm.txt /tmp/requirements.vllm.txt
COPY container/deps/requirements.planner.txt /tmp/requirements.planner.txt
COPY container/deps/requirements.benchmark.txt /tmp/requirements.benchmark.txt
COPY container/deps/requirements.test.txt /tmp/requirements.test.txt
RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install \
--requirement /tmp/requirements.common.txt \
--requirement /tmp/requirements.vllm.txt \
--requirement /tmp/requirements.planner.txt \
--requirement /tmp/requirements.benchmark.txt \
--requirement /tmp/requirements.test.txt && \
rm /tmp/requirements*.txt
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment