Unverified Commit a7105b67 authored by Kris Hung's avatar Kris Hung Committed by GitHub
Browse files

fix(sglang): ship nvtx package and nsys PATH for DYN_NVTX profiling (#8629)


Co-authored-by: default avatarClaude Opus 4.7 (1M context) <noreply@anthropic.com>
parent 5721dfe3
......@@ -16,6 +16,8 @@ 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
# NVTX Python bindings used by dynamo.common.utils.nvtx_utils for DYN_NVTX=1 profiling.
nvtx==0.2.14
opentelemetry-api<=1.38.0 # Pinned for tracing support
opentelemetry-exporter-otlp<=1.38.0
opentelemetry-sdk<=1.38.0
......
......@@ -5,7 +5,6 @@
av==15.0.0
ftfy==6.3.1
nvtx==0.2.14
# Pin transformers and onnxruntime: vLLM only sets a lower bound on
# transformers, so resolver drift can change versions between builds
# and shift LLaVA/vision preprocessing, making multimodal outputs
......
......@@ -68,6 +68,15 @@ RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \
fi
{% endif %}
# Install nvtx pinned in container/deps/requirements.common.txt so DYN_NVTX=1
# profiling works in all targets (runtime, dev, local-dev) — see
# components/src/dynamo/common/utils/nvtx_utils.py. --no-deps preserves the
# upstream lmsysorg/sglang Python stack.
RUN --mount=type=bind,source=./container/deps/requirements.common.txt,target=/tmp/requirements.common.txt \
--mount=type=cache,target=/root/.cache/pip,sharing=locked \
export PIP_CACHE_DIR=/root/.cache/pip && \
pip install --break-system-packages --no-deps $(grep -E '^nvtx==' /tmp/requirements.common.txt)
# Copy tests, deploy and components for CI with correct ownership
COPY --chmod=775 --chown=dynamo:0 tests /workspace/tests
COPY --chmod=775 --chown=dynamo:0 examples /workspace/examples
......@@ -87,7 +96,10 @@ RUN --mount=type=bind,source=./container/launch_message/runtime.txt,target=/opt/
RUN chmod 755 /opt/dynamo/.launch_screen && \
echo 'cat /opt/dynamo/.launch_screen' >> /etc/bash.bashrc && \
ln -s /workspace /sgl-workspace/dynamo
ln -s /workspace /sgl-workspace/dynamo && \
NSYS_BIN=$(find /opt/nvidia/nsight-compute -maxdepth 6 -type f -name nsys -executable 2>/dev/null | head -n1) && \
if [ -n "$NSYS_BIN" ]; then ln -sf "$NSYS_BIN" /usr/local/bin/nsys; \
else echo "WARNING: no bundled nsys found under /opt/nvidia/nsight-compute"; fi
USER dynamo
ARG DYNAMO_COMMIT_SHA
......
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