# sgl059 FROM lmsysorg/sglang:v0.5.9 ARG PIP_NO_CACHE_DIR=1 RUN pip install pybind11 RUN pip install nvidia-mathdx RUN MAX_JOBS=128 pip install -v --disable-pip-version-check --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" git+https://github.com/NVIDIA/apex.git RUN export NVTE_FRAMEWORK=pytorch && MAX_JOBS=128 NVTE_BUILD_THREADS_PER_JOB=4 pip3 install --resume-retries 999 --no-build-isolation git+https://github.com/NVIDIA/TransformerEngine.git@release_v2.12 # RUN pip install --upgrade transformers tokenizers RUN pip install codetiming mathruler pylatexenc qwen_vl_utils cachetools pytest-asyncio RUN pip install --no-build-isolation flash_attn==2.8.3 RUN NSIGHT_VERSION=2025.6.1_2025.6.1.190-1_$(if [ "$(uname -m)" = "aarch64" ]; then echo "arm64"; else echo "amd64"; fi) && \ wget https://developer.nvidia.com/downloads/assets/tools/secure/nsight-systems/2025_6/nsight-systems-${NSIGHT_VERSION}.deb && \ apt-get update && apt-get install -y libxcb-cursor0 && \ apt-get install -y ./nsight-systems-${NSIGHT_VERSION}.deb && \ rm -rf /usr/local/cuda/bin/nsys && \ ln -s /opt/nvidia/nsight-systems/2025.6.1/nsys /usr/local/cuda/bin/nsys && \ rm -rf /usr/local/cuda/bin/nsys-ui && \ ln -s /opt/nvidia/nsight-systems/2025.6.1/nsys-ui /usr/local/cuda/bin/nsys-ui && \ rm nsight-systems-${NSIGHT_VERSION}.deb # sglang image has already installed DeepEP RUN pip3 install --no-deps trl==0.27.0 RUN pip3 install nvtx matplotlib liger_kernel RUN pip install -U git+https://github.com/ISEEKYAN/mbridge.git RUN pip install --no-deps git+https://github.com/NVIDIA/Megatron-LM.git@core_v0.16.0 RUN pip install git+https://github.com/volcengine/verl.git@v0.7.0 && \ pip uninstall -y verl RUN sed -i '/nvidia-cudnn-cu12/d' /usr/local/lib/python3.12/dist-packages/torch-2.9.1+cu129.dist-info/METADATA && \ pip install --no-deps --force-reinstall nvidia-cudnn-cu12==9.16.0.29 # for packages compiled from source code RUN apt-get update && \ apt-get install -y --allow-downgrades --allow-change-held-packages \ libcudnn9-cuda-12=9.16.0.29-1 \ libcudnn9-dev-cuda-12=9.16.0.29-1 \ libcudnn9-headers-cuda-12=9.16.0.29-1 && \ rm -rf /var/lib/apt/lists/*