Skip to content

Commit de5573e

Browse files
Install full CUDA toolkit in final NVIDIA images (sm70, sm100)
The final container stage only installed cuda-libraries (runtime), which excluded nvcc and headers. Downstream builds of SELF failed with FindCUDAToolkit unable to locate nvcc. Switch to cuda-toolkit so the images support both compilation and execution. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d3660aa commit de5573e

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

envs/x86/sm100/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,14 @@ RUN dnf update -y \
155155
gcc-gfortran \
156156
lcov
157157

158-
# Install CUDA runtime libraries
158+
# Install CUDA toolkit (nvcc + libraries) so downstream projects can compile against CUDA
159159
ARG CUDA_VERSION=13.0
160160
RUN dnf config-manager \
161161
--add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo \
162162
&& dnf clean all \
163163
&& dnf update -y \
164164
&& dnf install -y \
165-
cuda-libraries-$(echo ${CUDA_VERSION} | tr '.' '-') \
166-
cuda-nvtx-$(echo ${CUDA_VERSION} | tr '.' '-')
165+
cuda-toolkit-$(echo ${CUDA_VERSION} | tr '.' '-')
167166

168167
# paths.view is a symlink, so copy the parent to avoid dereferencing and duplicating it
169168
COPY --from=builder /opt/views /opt/views

envs/x86/sm70/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,14 @@ RUN dnf update -y \
155155
gcc-gfortran \
156156
lcov
157157

158-
# Install CUDA runtime libraries
158+
# Install CUDA toolkit (nvcc + libraries) so downstream projects can compile against CUDA
159159
ARG CUDA_VERSION=12.4
160160
RUN dnf config-manager \
161161
--add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo \
162162
&& dnf clean all \
163163
&& dnf update -y \
164164
&& dnf install -y \
165-
cuda-libraries-$(echo ${CUDA_VERSION} | tr '.' '-') \
166-
cuda-nvtx-$(echo ${CUDA_VERSION} | tr '.' '-')
165+
cuda-toolkit-$(echo ${CUDA_VERSION} | tr '.' '-')
167166

168167
# paths.view is a symlink, so copy the parent to avoid dereferencing and duplicating it
169168
COPY --from=builder /opt/views /opt/views

0 commit comments

Comments
 (0)