summaryrefslogtreecommitdiff
path: root/containers/docker_build/Dockerfile.gpu
diff options
context:
space:
mode:
Diffstat (limited to 'containers/docker_build/Dockerfile.gpu')
-rw-r--r--containers/docker_build/Dockerfile.gpu40
1 files changed, 0 insertions, 40 deletions
diff --git a/containers/docker_build/Dockerfile.gpu b/containers/docker_build/Dockerfile.gpu
deleted file mode 100644
index 7ed08a5..0000000
--- a/containers/docker_build/Dockerfile.gpu
+++ /dev/null
@@ -1,40 +0,0 @@
1# Multi-stage build - GPU version builds on top of the base dev environment
2FROM rocky_dev:latest
3
4# Update and install GPU-specific packages
5RUN dnf update -y && \
6 dnf install -y kernel-headers kernel-devel pciutils && \
7 dnf clean all
8
9# Install NVIDIA container toolkit dependencies
10RUN dnf config-manager --add-repo https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo && \
11 dnf install -y nvidia-container-toolkit && \
12 dnf clean all
13
14# Set environment variables for NVIDIA
15ENV NVIDIA_VISIBLE_DEVICES=all
16ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
17
18# Add GPU test script
19RUN echo '#!/bin/bash' > /usr/local/bin/gpu-test.sh && \
20 echo 'echo "=== System Information ==="' >> /usr/local/bin/gpu-test.sh && \
21 echo 'cat /etc/rocky-release' >> /usr/local/bin/gpu-test.sh && \
22 echo 'echo' >> /usr/local/bin/gpu-test.sh && \
23 echo 'echo "=== PCI Devices (GPUs) ==="' >> /usr/local/bin/gpu-test.sh && \
24 echo 'lspci | grep -i nvidia' >> /usr/local/bin/gpu-test.sh && \
25 echo 'echo' >> /usr/local/bin/gpu-test.sh && \
26 echo 'echo "=== NVIDIA SMI ==="' >> /usr/local/bin/gpu-test.sh && \
27 echo 'if command -v nvidia-smi &> /dev/null; then' >> /usr/local/bin/gpu-test.sh && \
28 echo ' nvidia-smi' >> /usr/local/bin/gpu-test.sh && \
29 echo 'else' >> /usr/local/bin/gpu-test.sh && \
30 echo ' echo "nvidia-smi not found. GPU might not be accessible inside container."' >> /usr/local/bin/gpu-test.sh && \
31 echo 'fi' >> /usr/local/bin/gpu-test.sh && \
32 chmod +x /usr/local/bin/gpu-test.sh
33
34# Create workspace directory for GPU workloads
35RUN mkdir -p /workspace
36
37# Keep the same working directory and CMD from base image
38WORKDIR /root
39EXPOSE 22
40CMD ["/usr/sbin/sshd", "-D", "-e"] \ No newline at end of file