-
-
Notifications
You must be signed in to change notification settings - Fork 11.9k
[CI/Build] Moves to cuda-base runtime image while retaining minimal JIT dependencies #29270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,8 +20,8 @@ ARG PYTHON_VERSION=3.12 | |
| # glibc version is baked into the distro, and binaries built with one glibc | ||
| # version are not backwards compatible with OSes that use an earlier version. | ||
| ARG BUILD_BASE_IMAGE=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu20.04 | ||
| # TODO: Restore to base image after FlashInfer AOT wheel fixed | ||
| ARG FINAL_BASE_IMAGE=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu22.04 | ||
| # Using cuda base image with minimal dependencies necessary for JIT compilation (FlashInfer, DeepGEMM, EP kernels) | ||
| ARG FINAL_BASE_IMAGE=nvidia/cuda:${CUDA_VERSION}-base-ubuntu22.04 | ||
|
|
||
| # By parameterizing the Deadsnakes repository URL, we allow third-party to use | ||
| # their own mirror. When doing so, we don't benefit from the transparent | ||
|
|
@@ -328,6 +328,18 @@ RUN echo 'tzdata tzdata/Areas select America' | debconf-set-selections \ | |
| && curl -sS ${GET_PIP_URL} | python${PYTHON_VERSION} \ | ||
| && python3 --version && python3 -m pip --version | ||
|
|
||
| # Install CUDA development tools and build essentials for runtime JIT compilation | ||
| # (FlashInfer, DeepGEMM, EP kernels all require compilation at runtime) | ||
| RUN CUDA_VERSION_DASH=$(echo $CUDA_VERSION | cut -d. -f1,2 | tr '.' '-') && \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous step was missing
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is another PR that's open that addresses the previous |
||
| apt-get update -y && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| cuda-nvcc-${CUDA_VERSION_DASH} \ | ||
| cuda-cudart-${CUDA_VERSION_DASH} \ | ||
| cuda-nvrtc-${CUDA_VERSION_DASH} \ | ||
| cuda-cuobjdump-${CUDA_VERSION_DASH} \ | ||
| libcublas-${CUDA_VERSION_DASH} && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| ARG PIP_INDEX_URL UV_INDEX_URL | ||
| ARG PIP_EXTRA_INDEX_URL UV_EXTRA_INDEX_URL | ||
| ARG PYTORCH_CUDA_INDEX_BASE_URL | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change to use
nvidia/cuda:${CUDA_VERSION}-base-ubuntu22.04as theFINAL_BASE_IMAGEwill cause the Docker build to fail with the defaultCUDA_VERSION=12.9.1. The image tagnvidia/cuda:12.9.1-base-ubuntu22.04does not exist on Docker Hub. This will break the build at theFROM ${FINAL_BASE_IMAGE}instruction. WhileCUDA_VERSIONcan be overridden at build time, the default value should correspond to an existing image to ensure the Dockerfile is buildable out-of-the-box.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked, the image exists.
https://hub.docker.com/layers/nvidia/cuda/12.9.1-base-ubuntu22.04