1- FROM ghcr.io/nvidia/mirrors/rapidsai-devcontainers-25.10-cpp-cuda12.9
1+ FROM ghcr.io/nvidia/mirrors/nvidia-cuda-13.1.0-devel-ubuntu22.04
22
33ENV ACH_TUTORIAL=cuda-cpp \
4- ACH_NSYS_PATH=/usr/local/cuda-12.9/bin/nsys \
5- ACH_NCU_PATH =/usr/local/cuda-12.9 /bin/ncu \
6- PATH=/accelerated-computing-hub/brev/wrappers:${PATH} \
4+ PYTHON_VERSION=3.12 \
5+ ACH_NSYS_PATH =/usr/local/cuda/bin/nsys \
6+ ACH_NCU_PATH=/usr/local/cuda/bin/ncu \
77 PIP_ROOT_USER_ACTION=ignore \
8+ PIP_DISABLE_PIP_VERSION_CHECK=1 \
89 CUPY_CACHE_DIR=/tmp/cupy_cache \
9- MPLCONFIGDIR=/tmp/matplotlib_cache
10+ MPLCONFIGDIR=/tmp/matplotlib_cache \
11+ VIRTUAL_ENV_DISABLE_PROMPT=1 \
12+ PATH=/accelerated-computing-hub/brev/wrappers:/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
1013
11- # Copy only requirements.txt first for better Docker layer caching.
12- COPY tutorials/${ACH_TUTORIAL}/brev/requirements.txt /opt/requirements.txt
13-
14- RUN set -ex \
15- && `# Install Python packages` \
16- && pip install --no-cache-dir --root-user-action=ignore -r /opt/requirements.txt \
17- && rm -f /opt/requirements.txt \
18- && `# Install system packages` \
19- && apt-get update -y \
20- && apt-get install -y --no-install-recommends ffmpeg git-lfs gosu sudo \
21- && apt-get clean -y \
22- && rm -rf /var/lib/apt/lists/*
23-
24- # Disable unnecessary default Jupyter extensions.
25- RUN python -m jupyter labextension disable "@jupyterlab/apputils-extension:announcements" \
26- && python -m jupyter labextension disable "@jupyterlab/console-extension:tracker"
27-
28- # Enable passwordless sudo for all users and pass through environment and path
29- RUN echo 'ALL ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
30- && sed -i -e 's/^Defaults\s*env_reset/Defaults !env_reset/' -e 's/^Defaults\s*secure_path=/#&/' /etc/sudoers
31-
32- # Install Docker
14+ # Install system packages (needed before pip install for git-based packages)
3315RUN apt-get update -y \
3416 && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
17+ git \
18+ git-lfs \
3519 apt-transport-https \
3620 ca-certificates \
3721 curl \
3822 gnupg \
3923 lsb-release \
40- && mkdir -p /etc/apt/keyrings \
24+ gosu \
25+ libglib2.0-0 \
26+ sudo \
27+ ffmpeg \
28+ && apt-get clean -y \
29+ && rm -rf /var/lib/apt/lists/*
30+
31+ # Enable passwordless sudo for all users and pass through environment and path
32+ RUN echo 'ALL ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
33+ && sed -i -e 's/^Defaults\s*env_reset/Defaults !env_reset/' -e 's/^Defaults\s*secure_path=/#&/' /etc/sudoers
34+
35+ # Install Python
36+ RUN curl -fsSL https://keyserver.ubuntu.com/pks/lookup?op=get\&search=0xBA6932366A755776 | gpg --dearmor -o /usr/share/keyrings/deadsnakes.gpg \
37+ && echo "deb [signed-by=/usr/share/keyrings/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu jammy main" > /etc/apt/sources.list.d/deadsnakes-ppa.list \
38+ && apt-get update -y \
39+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
40+ python${PYTHON_VERSION} \
41+ python${PYTHON_VERSION}-dev \
42+ python${PYTHON_VERSION}-venv \
43+ && curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} \
44+ && ln -sf /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 \
45+ && ln -sf /usr/bin/python3 /usr/bin/python \
46+ && ln -s /usr/local/bin/pip /usr/bin/pip \
47+ && rm -f /usr/lib/python3.*/EXTERNALLY-MANAGED \
48+ && rm -rf /var/lib/apt/lists/*
49+
50+ # Install Docker
51+ RUN mkdir -p /etc/apt/keyrings \
4152 && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
4253 && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
4354 && apt-get update -y \
@@ -50,9 +61,20 @@ RUN apt-get update -y \
5061 && apt-get clean -y \
5162 && rm -rf /var/lib/apt/lists/*
5263
64+ # Copy only requirements.txt first for better Docker layer caching.
65+ COPY tutorials/${ACH_TUTORIAL}/brev/requirements.txt /opt/requirements.txt
66+
67+ # Install Python packages.
68+ RUN pip install --no-cache-dir --root-user-action=ignore -r /opt/requirements.txt \
69+ && rm -f /opt/requirements.txt
70+
71+ # Disable unnecessary default Jupyter extensions.
72+ RUN python -m jupyter labextension disable "@jupyterlab/apputils-extension:announcements" \
73+ && python -m jupyter labextension disable "@jupyterlab/console-extension:tracker"
74+
5375COPY . /accelerated-computing-hub
5476
55- # Ensure accelerated-computing-hub directory is writable by any user
77+ # Ensure accelerated-computing-hub directory is writable by any user.
5678RUN chmod -R a+rwX /accelerated-computing-hub
5779
5880WORKDIR /accelerated-computing-hub/tutorials/${ACH_TUTORIAL}/notebooks
0 commit comments