Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 10 additions & 43 deletions images/runtime/ray/cuda/2.52.1-py311-cu121/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,52 +72,14 @@ RUN yum install -y \
# Set this flag so that libraries can find the location of CUDA
ENV XLA_FLAGS=--xla_gpu_cuda_data_dir=/usr/local/cuda

# Install CUDA devel from:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.1.1/ubi9/devel/Dockerfile
ENV NV_CUDA_LIB_VERSION=12.1.1-1
ENV NV_NVPROF_VERSION=12.1.105-1
ENV NV_NVPROF_DEV_PACKAGE=cuda-nvprof-12-1-${NV_NVPROF_VERSION}
ENV NV_CUDA_CUDART_DEV_VERSION=12.1.105-1
ENV NV_NVML_DEV_VERSION=12.1.105-1
ENV NV_LIBCUBLAS_DEV_VERSION=12.1.3.1-1
ENV NV_LIBNPP_DEV_VERSION=12.1.0.40-1
ENV NV_LIBNPP_DEV_PACKAGE=libnpp-devel-12-1-${NV_LIBNPP_DEV_VERSION}
ENV NV_LIBNCCL_DEV_PACKAGE_NAME=libnccl-devel
ENV NV_LIBNCCL_DEV_PACKAGE_VERSION=2.17.1-1
ENV NCCL_VERSION=2.17.1
ENV NV_LIBNCCL_DEV_PACKAGE=${NV_LIBNCCL_DEV_PACKAGE_NAME}-${NV_LIBNCCL_DEV_PACKAGE_VERSION}+cuda12.1
ENV NV_CUDA_NSIGHT_COMPUTE_VERSION=12.1.1-1
ENV NV_CUDA_NSIGHT_COMPUTE_DEV_PACKAGE=cuda-nsight-compute-12-1-${NV_CUDA_NSIGHT_COMPUTE_VERSION}

RUN yum install -y \
make \
findutils \
cuda-command-line-tools-12-1-${NV_CUDA_LIB_VERSION} \
cuda-libraries-devel-12-1-${NV_CUDA_LIB_VERSION} \
cuda-minimal-build-12-1-${NV_CUDA_LIB_VERSION} \
cuda-cudart-devel-12-1-${NV_CUDA_CUDART_DEV_VERSION} \
${NV_NVPROF_DEV_PACKAGE} \
cuda-nvml-devel-12-1-${NV_NVML_DEV_VERSION} \
libcublas-devel-12-1-${NV_LIBCUBLAS_DEV_VERSION} \
${NV_LIBNPP_DEV_PACKAGE} \
${NV_LIBNCCL_DEV_PACKAGE} \
${NV_CUDA_NSIGHT_COMPUTE_DEV_PACKAGE} \
&& yum clean all \
&& rm -rf /var/cache/yum/*

ENV LIBRARY_PATH=/usr/local/cuda/lib64/stubs

# Install CUDA devel cudnn8 from:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.1.1/ubi9/devel/cudnn8/Dockerfile
# Install CUDA runtime cudnn from:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.8.0/ubi9/runtime/cudnn/Dockerfile
Comment on lines +75 to +76
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix misleading comment reference to incorrect CUDA version.

Line 76 references the NVIDIA Dockerfile from "dist/12.8.0" but this file is for CUDA 12.1. This appears to be a copy-paste error from the other Dockerfile. Update the reference to "dist/12.1.1" for accuracy.

Apply this diff:

-# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.8.0/ubi9/runtime/cudnn/Dockerfile
+# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.1.1/ubi9/runtime/cudnn/Dockerfile
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Install CUDA runtime cudnn from:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.8.0/ubi9/runtime/cudnn/Dockerfile
# Install CUDA runtime cudnn from:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.1.1/ubi9/runtime/cudnn/Dockerfile
🤖 Prompt for AI Agents
In images/runtime/ray/cuda/2.52.1-py311-cu121/Dockerfile around lines 75 to 76,
the comment references the NVIDIA Dockerfile path "dist/12.8.0" which is
incorrect for this CUDA 12.1 image; update the reference to "dist/12.1.1" to
accurately point to the matching NVIDIA cudnn runtime Dockerfile. Replace the
"dist/12.8.0" fragment in the URL with "dist/12.1.1" and keep the rest of the
comment unchanged.

ENV NV_CUDNN_VERSION=8.9.0.131-1
ENV NV_CUDNN_PACKAGE=libcudnn8-${NV_CUDNN_VERSION}.cuda12.1
ENV NV_CUDNN_PACKAGE_DEV=libcudnn8-devel-${NV_CUDNN_VERSION}.cuda12.1

LABEL com.nvidia.cudnn.version="${NV_CUDNN_VERSION}"

RUN yum install -y \
${NV_CUDNN_PACKAGE} \
${NV_CUDNN_PACKAGE_DEV} \
RUN yum install -y ${NV_CUDNN_PACKAGE} \
&& yum clean all \
&& rm -rf /var/cache/yum/*

Expand All @@ -129,8 +91,13 @@ RUN pip install --no-cache-dir -U "micropipenv[toml]"
# Install Python dependencies from Pipfile.lock file
COPY Pipfile.lock ./

RUN micropipenv install && rm -f ./Pipfile.lock
RUN micropipenv install && rm -f ./Pipfile.lock && \
# Cleanup Python cache and debug symbols
find /opt/app-root/lib/python3.11/site-packages -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true && \
find /opt/app-root/lib/python3.11/site-packages -name "*.pyc" -delete 2>/dev/null || true && \
find /opt/app-root/lib/python3.11/site-packages -name "*.pyo" -delete 2>/dev/null || true && \
find /opt/app-root/lib/python3.11/site-packages -name "*.so" -exec strip --strip-debug {} \; 2>/dev/null || true

# Restore user workspace
USER 1001
WORKDIR /opt/app-root/src
WORKDIR /opt/app-root/src
56 changes: 10 additions & 46 deletions images/runtime/ray/cuda/2.52.1-py312-cu128/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,55 +79,14 @@ RUN yum install -y \
# Set this flag so that libraries can find the location of CUDA
ENV XLA_FLAGS=--xla_gpu_cuda_data_dir=/usr/local/cuda

# Install CUDA devel from:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.8.0/ubi9/devel/Dockerfile
ENV NV_CUDA_LIB_VERSION=12.8.0-1
# ARM64 doesn't have nvprof package - set in runtime
ENV NV_NVPROF_VERSION=12.8.57-1
ENV NV_NVPROF_DEV_PACKAGE=cuda-nvprof-12-8-${NV_NVPROF_VERSION}
ENV NV_CUDA_CUDART_DEV_VERSION=12.8.57-1
ENV NV_NVML_DEV_VERSION=12.8.55-1
ENV NV_LIBCUBLAS_DEV_VERSION=12.8.3.14-1
ENV NV_LIBNPP_DEV_VERSION=12.3.3.65-1
ENV NV_LIBNPP_DEV_PACKAGE=libnpp-devel-12-8-${NV_LIBNPP_DEV_VERSION}
ENV NV_LIBNCCL_DEV_PACKAGE_NAME=libnccl-devel
ENV NV_LIBNCCL_DEV_PACKAGE_VERSION=2.25.1-1
ENV NCCL_VERSION=2.25.1
ENV NV_LIBNCCL_DEV_PACKAGE=${NV_LIBNCCL_DEV_PACKAGE_NAME}-${NV_LIBNCCL_DEV_PACKAGE_VERSION}+cuda12.8
ENV NV_CUDA_NSIGHT_COMPUTE_VERSION=12.8.0-1
ENV NV_CUDA_NSIGHT_COMPUTE_DEV_PACKAGE=cuda-nsight-compute-12-8-${NV_CUDA_NSIGHT_COMPUTE_VERSION}

RUN yum install -y \
make \
findutils \
cuda-command-line-tools-12-8-${NV_CUDA_LIB_VERSION} \
cuda-libraries-devel-12-8-${NV_CUDA_LIB_VERSION} \
cuda-minimal-build-12-8-${NV_CUDA_LIB_VERSION} \
cuda-cudart-devel-12-8-${NV_CUDA_CUDART_DEV_VERSION} \
cuda-nvml-devel-12-8-${NV_NVML_DEV_VERSION} \
libcublas-devel-12-8-${NV_LIBCUBLAS_DEV_VERSION} \
${NV_LIBNPP_DEV_PACKAGE} \
${NV_LIBNCCL_DEV_PACKAGE} \
${NV_CUDA_NSIGHT_COMPUTE_DEV_PACKAGE} \
&& if [ "${TARGETARCH}" != "arm64" ]; then \
yum install -y ${NV_NVPROF_DEV_PACKAGE}; \
fi \
&& yum clean all \
&& rm -rf /var/cache/yum/*

ENV LIBRARY_PATH=/usr/local/cuda/lib64/stubs

# Install CUDA devel cudnn from:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.8.0/ubi9/devel/cudnn/Dockerfile
# Install CUDA runtime cudnn from:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.8.0/ubi9/runtime/cudnn/Dockerfile
ENV NV_CUDNN_VERSION=9.7.0.66-1
ENV NV_CUDNN_PACKAGE=libcudnn9-cuda-12-${NV_CUDNN_VERSION}
ENV NV_CUDNN_PACKAGE_DEV=libcudnn9-devel-cuda-12-${NV_CUDNN_VERSION}

LABEL com.nvidia.cudnn.version="${NV_CUDNN_VERSION}"

RUN yum install -y \
${NV_CUDNN_PACKAGE} \
${NV_CUDNN_PACKAGE_DEV} \
RUN yum install -y ${NV_CUDNN_PACKAGE} \
&& yum clean all \
&& rm -rf /var/cache/yum/*

Expand All @@ -139,8 +98,13 @@ RUN pip install --no-cache-dir -U "micropipenv[toml]"
# Install Python dependencies from Pipfile.lock file
COPY Pipfile.lock ./

RUN micropipenv install && rm -f ./Pipfile.lock
RUN micropipenv install && rm -f ./Pipfile.lock && \
# Cleanup Python cache and debug symbols
find /opt/app-root/lib/python3.12/site-packages -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true && \
find /opt/app-root/lib/python3.12/site-packages -name "*.pyc" -delete 2>/dev/null || true && \
find /opt/app-root/lib/python3.12/site-packages -name "*.pyo" -delete 2>/dev/null || true && \
find /opt/app-root/lib/python3.12/site-packages -name "*.so" -exec strip --strip-debug {} \; 2>/dev/null || true

# Restore user workspace
USER 1001
WORKDIR /opt/app-root/src
WORKDIR /opt/app-root/src
14 changes: 11 additions & 3 deletions images/runtime/ray/rocm/2.52.1-py311-rocm61/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOD
EOF

RUN yum -y install rocm && yum clean all && rm -rf /var/cache/yum
# Install ROCm ML SDK only (runtime optimized)
RUN yum install -y rocm-ml-sdk \
&& yum clean all \
&& rm -rf /var/cache/yum/*

# Install Python packages

Expand All @@ -47,8 +50,13 @@ RUN pip install --no-cache-dir -U "micropipenv[toml]"
# Install Python dependencies from Pipfile.lock file
COPY Pipfile.lock ./

RUN micropipenv install && rm -f ./Pipfile.lock
RUN micropipenv install && rm -f ./Pipfile.lock && \
# Cleanup Python cache and debug symbols
find /opt/app-root/lib/python3.11/site-packages -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true && \
find /opt/app-root/lib/python3.11/site-packages -name "*.pyc" -delete 2>/dev/null || true && \
find /opt/app-root/lib/python3.11/site-packages -name "*.pyo" -delete 2>/dev/null || true && \
find /opt/app-root/lib/python3.11/site-packages -name "*.so" -exec strip --strip-debug {} \; 2>/dev/null || true

# Restore user workspace
USER 1001
WORKDIR /opt/app-root/src
WORKDIR /opt/app-root/src
12 changes: 10 additions & 2 deletions images/runtime/ray/rocm/2.52.1-py312-rocm62/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOD
EOF

RUN yum install -y rocm-developer-tools rocm-ml-sdk rocm-opencl-sdk rocm-openmp-sdk rocm-utils && yum clean all && rm -rf /var/cache/yum
# Install ROCm ML SDK only (runtime optimized)
RUN yum install -y rocm-ml-sdk \
&& yum clean all \
&& rm -rf /var/cache/yum/*

# Install Python packages

Expand All @@ -47,7 +50,12 @@ RUN pip install --no-cache-dir -U "micropipenv[toml]"
# Install Python dependencies from Pipfile.lock file
COPY Pipfile.lock ./

RUN micropipenv install && rm -f ./Pipfile.lock
RUN micropipenv install && rm -f ./Pipfile.lock && \
# Cleanup Python cache and debug symbols
find /opt/app-root/lib/python3.12/site-packages -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true && \
find /opt/app-root/lib/python3.12/site-packages -name "*.pyc" -delete 2>/dev/null || true && \
find /opt/app-root/lib/python3.12/site-packages -name "*.pyo" -delete 2>/dev/null || true && \
find /opt/app-root/lib/python3.12/site-packages -name "*.so" -exec strip --strip-debug {} \; 2>/dev/null || true

# Restore user workspace
USER 1001
Expand Down