Skip to content
Draft
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
61 changes: 56 additions & 5 deletions container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
##################################

# Base image configuration
ARG BASE_IMAGE="nvcr.io/nvidia/cuda-dl-base"
ARG BASE_IMAGE="nvcr.io/nvidia/base/ubuntu"
# TODO OPS-612: NCCL will hang with 25.03, so use 25.01 for now
# Please check https://github.com/ai-dynamo/dynamo/pull/1065
# for details and reproducer to manually test if the image
# can be updated to later versions.
ARG BASE_IMAGE_TAG="25.01-cuda12.8-devel-ubuntu24.04"
ARG BASE_IMAGE_TAG="noble-20250619"

# Build configuration
ARG ENABLE_KVBM=false
Expand Down Expand Up @@ -322,9 +322,9 @@ RUN --mount=type=secret,id=aws-key-id,env=AWS_ACCESS_KEY_ID \
fi && \
/tmp/use-sccache.sh show-stats "Dynamo"

##############################################
###################################################
########## Dev entrypoint image ##############
##############################################
###################################################

FROM base AS dev

Expand All @@ -333,7 +333,8 @@ ARG ARCH_ALT

# Application environment variables
ENV DYNAMO_HOME=/opt/dynamo \
CARGO_TARGET_DIR=/opt/dynamo/target
CARGO_TARGET_DIR=/opt/dynamo/target \
CARGO_HOME=/usr/local/cargo

# NIXL environment variables
ENV NIXL_PREFIX=/opt/nvidia/nvda_nixl \
Expand Down Expand Up @@ -401,3 +402,53 @@ RUN --mount=type=bind,source=./container/launch_message.txt,target=/opt/dynamo/l

ENTRYPOINT ["/opt/nvidia/nvidia_entrypoint.sh"]
CMD []

FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG} AS frontend

# Install uv package manager
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

COPY --from=dev /usr/bin/nats-server /usr/bin/nats-server
COPY --from=dev /usr/local/bin/etcd/ /usr/local/bin/etcd/
# Add ETCD to PATH
ENV PATH=/usr/local/bin/etcd:$PATH

# Create and activate virtual environment
ARG PYTHON_VERSION
RUN mkdir -p /opt/dynamo/venv && \
uv venv /opt/dynamo/venv --python $PYTHON_VERSION

ENV VIRTUAL_ENV=/opt/dynamo/venv \
PATH="/opt/dynamo/venv/bin:${PATH}"

COPY benchmarks/ /opt/dynamo/benchmarks/
COPY --from=dev /opt/dynamo/wheelhouse/ /opt/dynamo/wheelhouse/
RUN uv pip install \
/opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \
/opt/dynamo/wheelhouse/nixl/nixl*.whl && \
if [ "$ENABLE_KVBM" = "true" ]; then \
uv pip install /opt/dynamo/wheelhouse/kvbm*.whl; \
fi \
&& cd /opt/dynamo/benchmarks \
&& UV_GIT_LFS=1 uv pip install --no-cache . \
&& cd - \
&& rm -rf /opt/dynamo/benchmarks

RUN --mount=type=bind,source=./container/deps/requirements.txt,target=/tmp/requirements.txt \
--mount=type=bind,source=./container/deps/requirements.test.txt,target=/tmp/requirements.test.txt \
UV_GIT_LFS=1 uv pip install \
--no-cache \
--requirement /tmp/requirements.txt \
--requirement /tmp/requirements.test.txt

COPY . /workspace/

# Setup launch banner
RUN --mount=type=bind,source=./container/launch_message.txt,target=/opt/dynamo/launch_message.txt \
sed '/^#\s/d' /opt/dynamo/launch_message.txt > ~/.launch_screen && \
echo "cat ~/.launch_screen" >> ~/.bashrc && \
echo "source $VIRTUAL_ENV/bin/activate" >> ~/.bashrc

ENTRYPOINT ["/opt/nvidia/nvidia_entrypoint.sh"]
CMD []
2 changes: 1 addition & 1 deletion container/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ENVIRONMENT_VARIABLES=
REMAINING_ARGS=
INTERACTIVE=
USE_NIXL_GDS=
RUNTIME=nvidia
RUNTIME=
WORKDIR=/workspace
NETWORK=host

Expand Down
10 changes: 5 additions & 5 deletions examples/backends/sglang/deploy/agg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
apiVersion: nvidia.com/v1alpha1
kind: DynamoGraphDeployment
metadata:
name: sglang-agg
name: tusharma-sglang-agg
spec:
services:
Frontend:
dynamoNamespace: sglang-agg
dynamoNamespace: tusharma
componentType: frontend
replicas: 1
extraPodSpec:
mainContainer:
image: my-registry/sglang-runtime:my-tag
image: nvcr.io/nvidian/dynamo-dev/tusharma-frontend:0.2.0
decode:
envFromSecret: hf-token-secret
dynamoNamespace: sglang-agg
dynamoNamespace: tusharma
componentType: worker
replicas: 1
resources:
limits:
gpu: "1"
extraPodSpec:
mainContainer:
image: my-registry/sglang-runtime:my-tag
image: nvcr.io/nvidia/ai-dynamo/sglang-runtime:0.6.0
workingDir: /workspace/examples/backends/sglang
command:
- python3
Expand Down
Loading