Skip to content

Commit 3d10b64

Browse files
authored
Merge pull request #264 from Fiona-Waters/update-3.2b
Updating py312-cuda Dockerfile.konflux
2 parents ee5a271 + 6eb33bb commit 3d10b64

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

images/runtime/training/py312-cuda128-torch280/Dockerfile.konflux

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ENV CUDA_VERSION=12.8.0 \
2121
NVIDIA_DRIVER_CAPABILITIES=compute,utility \
2222
NV_CUDA_CUDART_VERSION=12.8.57-1 \
2323
NV_CUDA_COMPAT_VERSION=3:570.172.08-1.el9 \
24-
NV_CUDA_NVCC_VERSION=12.8.61-1
24+
NV_CUDA_NVCC_VERSION=12.8.93-1
2525

2626
# Ref: https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.8.0/ubi9/base/Dockerfile
2727
# nvcc is required for Flash Attention
@@ -30,13 +30,24 @@ RUN dnf config-manager \
3030
&& dnf install -y \
3131
--disablerepo=rhel-9-for-x86_64-baseos-rpms \
3232
--disablerepo=rhel-9-for-x86_64-appstream-rpms \
33+
cuda-cudart-devel-12-8-${NV_CUDA_CUDART_VERSION} \
34+
cuda-libraries-devel-12-8-${NV_CUDA_LIB_VERSION} \
3335
cuda-cudart-12-8-${NV_CUDA_CUDART_VERSION} \
3436
cuda-compat-12-8-${NV_CUDA_COMPAT_VERSION} \
3537
cuda-nvcc-12-8-${NV_CUDA_NVCC_VERSION} \
3638
&& echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf \
3739
&& echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf \
3840
&& dnf clean all
3941

42+
# Add build tools for compiling PyTorch extensions
43+
RUN dnf install -y --disablerepo="*" --enablerepo="ubi-9-appstream-rpms,ubi-9-baseos-rpms" \
44+
gcc-c++ \
45+
make \
46+
cmake \
47+
git \
48+
&& dnf clean all \
49+
&& rm -rf /var/cache/dnf/*
50+
4051
ENV CUDA_HOME="/usr/local/cuda" \
4152
PATH="/usr/local/nvidia/bin:${CUDA_HOME}/bin:${PATH}" \
4253
LD_LIBRARY_PATH="/usr/local/nvidia/lib:/usr/local/nvidia/lib64:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64:$LD_LIBRARY_PATH"
@@ -56,6 +67,9 @@ RUN dnf install -y --disablerepo="*" --enablerepo="cuda-rhel9-x86_64,mlnx_ofed_2
5667
&& dnf clean all \
5768
&& rm -rf /var/cache/dnf/*
5869

70+
# Ensure cuDNN from pip is discoverable during source builds
71+
ENV LD_LIBRARY_PATH="/opt/app-root/lib/python3.12/site-packages/nvidia/cudnn/lib:${LD_LIBRARY_PATH}"
72+
5973
# Install Python packages
6074

6175
# Install micropipenv to deploy packages from Pipfile.lock
@@ -88,6 +102,17 @@ RUN pip install \
88102
nvidia-nvtx-cu12==12.8.90 \
89103
&& fix-permissions /opt/app-root -P
90104

105+
# Build helpers to compile PyTorch extensions
106+
RUN pip install -U pip setuptools wheel ninja cmake
107+
108+
# Optional: set GPU archs if you hit arch issues
109+
ENV TORCH_CUDA_ARCH_LIST="8.0;8.6;8.9;9.0"
110+
111+
# Deterministic 2-step: sub-dep first, then parent without deps
112+
RUN pip install --no-build-isolation --no-cache-dir causal-conv1d==1.5.3.post1 && \
113+
pip install --no-build-isolation --no-cache-dir mamba-ssm==2.2.6.post3 --no-deps && \
114+
fix-permissions /opt/app-root -P
115+
91116
# Restore user workspace
92117
USER 1001
93118

0 commit comments

Comments
 (0)