Skip to content

Commit 4f9d175

Browse files
committed
modify Dockerfile to stop pulling cuda:12.9.1-ubi9 base image
Signed-off-by: Tariq Ibrahim <[email protected]>
1 parent ee39b45 commit 4f9d175

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

docker/Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,18 @@ RUN make cmds
4040

4141
FROM nvcr.io/nvidia/cuda:13.0.1-base-ubi9 AS cuda-base
4242

43-
RUN dnf install -y --allowerasing \
44-
curl \
45-
&& \
46-
dnf clean all
43+
FROM registry.access.redhat.com/ubi9/ubi:latest AS sample-builder
4744

48-
WORKDIR /workspace
45+
ARG CUDA_COMPAT_PKG_VERSION=12-9
4946

50-
FROM nvcr.io/nvidia/cuda:12.9.1-base-ubi9 AS sample-builder
47+
RUN ARCH=$(uname -m) && OS_ARCH=${ARCH/amd64/x86_64} && OS_ARCH=${ARCH/aarch64/sbsa} && OS_ARCH=${ARCH/arm64/sbsa} \
48+
dnf config-manager addrepo --from-repofile=https://developer.download.nvidia.com/compute/cuda/repos/rhel9/$OS_ARCH/cuda-rhel9.repo
5149

5250
RUN dnf install -y --allowerasing \
5351
cmake \
54-
cuda-cudart-devel-12-9 \
55-
cuda-nvcc-12-9 \
52+
cuda-cudart-devel-${CUDA_COMPAT_PKG_VERSION} \
53+
cuda-compat-${CUDA_COMPAT_PKG_VERSION} \
54+
cuda-nvcc-${CUDA_COMPAT_PKG_VERSION} \
5655
g++ \
5756
curl \
5857
&& \

0 commit comments

Comments
 (0)