Skip to content

Commit 5f53a5e

Browse files
committed
Updated the Dockerfile of nvidia
1 parent 6bb5acf commit 5f53a5e

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

docker/Dockerfile.gpu-nvidia

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# NVIDIA CUDA GPU Dockerfile for Quantum Computing 101
1+
# NVIDIA CLABEL description="NVIDIA CUDA 12.9.1 with cuDNN accelerated quantum computing examples"DA GPU Dockerfile for Quantum Computing 101
22
# Multi-stage build optimized for NVIDIA GPU acceleration
33

4-
# Stage 1: Base CUDA environment (Updated to latest CUDA 12.6)
5-
FROM nvidia/cuda:12.6.1-devel-ubuntu22.04 as cuda-base
4+
# Stage 1: Base CUDA environment
5+
FROM nvidia/cuda:12.9.1-cudnn-devel-ubuntu24.04 as cuda-base
66

77
# Set labels for metadata
88
LABEL maintainer="Quantum Computing 101"
9-
LABEL version="2.0"
9+
LABEL version="2.1"
1010
LABEL variant="gpu-nvidia"
11-
LABEL description="NVIDIA CUDA-accelerated quantum computing examples"
11+
LABEL description="NVIDIA CUDA 12.9.1 with cuDNN accelerated quantum computing examples"
1212

1313
# Set environment variables for CUDA optimization
1414
ENV DEBIAN_FRONTEND=noninteractive
@@ -26,7 +26,7 @@ ENV QISKIT_IN_PARALLEL=TRUE
2626
RUN apt-get update && apt-get install -y \
2727
python3.12 \
2828
python3.12-dev \
29-
python3.12-distutils \
29+
python3.12-venv \
3030
python3-pip \
3131
gcc \
3232
g++ \
@@ -55,18 +55,18 @@ RUN ln -sf /usr/bin/python3.12 /usr/bin/python && \
5555
FROM cuda-base as python-deps
5656

5757
# Upgrade pip and install build tools
58-
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
58+
RUN pip install --no-cache-dir --break-system-packages --ignore-installed --upgrade pip setuptools wheel
5959

6060
# Copy requirements files
6161
COPY docker/requirements/ /tmp/requirements/
6262

6363
# Install Python dependencies in optimal order for layer caching
6464
# Install base requirements first (most stable) - excluding qiskit-aer to avoid conflicts
6565
RUN sed '/^qiskit-aer/d' /tmp/requirements/base.txt > /tmp/requirements/base-no-aer.txt && \
66-
pip install --no-cache-dir -r /tmp/requirements/base-no-aer.txt
66+
pip install --no-cache-dir --break-system-packages -r /tmp/requirements/base-no-aer.txt
6767

6868
# Install NVIDIA-specific requirements (includes qiskit-aer-gpu)
69-
RUN pip install --no-cache-dir -r /tmp/requirements/gpu-nvidia.txt
69+
RUN pip install --no-cache-dir --break-system-packages -r /tmp/requirements/gpu-nvidia.txt
7070

7171
# Stage 3: Application setup
7272
FROM python-deps as app-setup
@@ -81,7 +81,7 @@ WORKDIR /home/qc101/quantum-computing-101
8181
COPY --chown=qc101:qc101 . /home/qc101/quantum-computing-101/
8282

8383
# Install the package in development mode
84-
RUN pip install --no-cache-dir -e .
84+
RUN pip install --no-cache-dir --break-system-packages -e .
8585

8686
# Create output directory for results
8787
RUN mkdir -p /home/qc101/quantum-computing-101/outputs && \

docker/requirements/gpu-nvidia.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ cupy-cuda12x>=13.0.0
99
# Install qiskit-aer-gpu instead of regular qiskit-aer for CUDA support
1010
qiskit-aer-gpu>=0.14.0
1111

12-
# PyTorch with CUDA support (Updated to PyTorch 2.2+ with CUDA 12.1)
13-
--index-url https://download.pytorch.org/whl/cu121
14-
torch>=2.2.0+cu121
15-
torchvision>=0.17.0+cu121
16-
torchaudio>=2.2.0+cu121
12+
# PyTorch with CUDA support (CUDA 12.4 is latest supported by PyTorch)
13+
--index-url https://download.pytorch.org/whl/cu124
14+
torch
15+
torchvision
16+
torchaudio
1717

1818
# Additional ML and visualization tools
1919
tensorboard>=2.15.0

0 commit comments

Comments
 (0)