|
1 | | -FROM rapidsai/devcontainers:25.10-cpp-cuda12.9 |
| 1 | +FROM pytorch/pytorch:2.9.0-cuda12.8-cudnn9-runtime |
2 | 2 |
|
3 | 3 | ARG GIT_BRANCH_NAME |
4 | 4 |
|
5 | 5 | ENV GIT_BRANCH_NAME=${GIT_BRANCH_NAME} \ |
6 | 6 | PIP_ROOT_USER_ACTION=ignore \ |
7 | | - ACH_TUTORIAL=accelerated-python \ |
8 | | - ACH_CUDF_VENV=/opt/venvs/cudf |
| 7 | + ACH_TUTORIAL=accelerated-python |
| 8 | + |
| 9 | +# Install system packages (needed before pip install for git-based packages) |
| 10 | +RUN apt-get update -y \ |
| 11 | + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ |
| 12 | + git \ |
| 13 | + git-lfs \ |
| 14 | + && apt-get clean -y \ |
| 15 | + && rm -rf /var/lib/apt/lists/* |
9 | 16 |
|
10 | 17 | # Copy only requirements.txt first for better Docker layer caching. |
11 | 18 | COPY tutorials/${ACH_TUTORIAL}/brev/requirements.txt /opt/requirements.txt |
12 | 19 |
|
13 | | -RUN set -ex \ |
14 | | - && `# Install Python packages` \ |
15 | | - && pip install --no-cache-dir --root-user-action=ignore -r /opt/requirements.txt \ |
16 | | - && rm -f /opt/requirements.txt \ |
17 | | - && `# Install system packages` \ |
18 | | - && apt-get update -y \ |
19 | | - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ |
20 | | - git-lfs \ |
21 | | - openmpi-bin \ |
22 | | - libopenmpi-dev \ |
23 | | - && apt-get clean -y \ |
24 | | - && rm -rf /var/lib/apt/lists/* \ |
25 | | - && `# Setup Bash` \ |
26 | | - && mkdir -p ~/.local/state/._bash_history \ |
27 | | - && `# Setup JupyterLab` \ |
28 | | - && mkdir -p ~/.jupyter \ |
29 | | - && ln -fs /accelerated-computing-hub/brev/jupyter-server-config.py ~/.jupyter/jupyter_server_config.py \ |
30 | | - && mkdir -p ~/.ipython/profile_default/startup \ |
31 | | - && ln -fs /accelerated-computing-hub/brev/ipython-startup-add-cwd-to-path.py ~/.ipython/profile_default/startup/00-add-cwd-to-path.py \ |
32 | | - && python -m jupyter labextension disable "@jupyterlab/apputils-extension:announcements" \ |
33 | | - && `# Create an isolated Python venv with cuDF and register it as a Jupyter kernel` \ |
34 | | - && python -m venv ${ACH_CUDF_VENV} \ |
35 | | - && ${ACH_CUDF_VENV}/bin/python -m pip install --upgrade pip \ |
36 | | - && ${ACH_CUDF_VENV}/bin/pip install \ |
37 | | - --extra-index-url=https://pypi.nvidia.com \ |
38 | | - "cudf-cu12==25.8.*" \ |
39 | | - ipykernel \ |
40 | | - && ${ACH_CUDF_VENV}/bin/python -m ipykernel install \ |
41 | | - --name=python3-cudf25.8-cu12 \ |
42 | | - --display-name="Python 3 (cuDF 25.8)" \ |
43 | | - --prefix=/usr/local |
| 20 | +# Install Python packages. |
| 21 | +RUN pip install --no-cache-dir --root-user-action=ignore -r /opt/requirements.txt \ |
| 22 | + && rm -f /opt/requirements.txt |
| 23 | + |
| 24 | +# Install MPI. |
| 25 | +RUN apt-get update -y \ |
| 26 | + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ |
| 27 | + openmpi-bin \ |
| 28 | + libopenmpi-dev \ |
| 29 | + && apt-get clean -y \ |
| 30 | + && rm -rf /var/lib/apt/lists/* |
| 31 | + |
| 32 | +# Install RAPIDS packages from NVIDIA PyPI. |
| 33 | +RUN pip install --no-cache-dir --root-user-action=ignore \ |
| 34 | + --extra-index-url=https://pypi.nvidia.com \ |
| 35 | + "cudf-cu12==25.10.*" \ |
| 36 | + "cuml-cu12==25.10.*" |
| 37 | + |
| 38 | +# Setup Bash & JupyterLab. |
| 39 | +RUN mkdir -p ~/.local/state/._bash_history \ |
| 40 | + && mkdir -p ~/.jupyter \ |
| 41 | + && ln -fs /accelerated-computing-hub/brev/jupyter-server-config.py ~/.jupyter/jupyter_server_config.py \ |
| 42 | + && mkdir -p ~/.ipython/profile_default/startup \ |
| 43 | + && ln -fs /accelerated-computing-hub/brev/ipython-startup-add-cwd-to-path.py ~/.ipython/profile_default/startup/00-add-cwd-to-path.py \ |
| 44 | + && python -m jupyter labextension disable "@jupyterlab/apputils-extension:announcements" |
44 | 45 |
|
45 | 46 | COPY . /accelerated-computing-hub |
46 | 47 | COPY brev/update-git-branch.bash /opt/update-git-branch.bash |
47 | 48 |
|
48 | 49 | WORKDIR /accelerated-computing-hub/tutorials/${ACH_TUTORIAL}/notebooks |
49 | 50 |
|
50 | | -RUN `# Setup Git` \ |
51 | | - && git config --unset-all "http.https://github.com/.extraheader" || { code=$?; [ "$code" = 5 ] || exit "$code"; } \ |
52 | | - && git config --global --add safe.directory "/accelerated-computing-hub" |
| 51 | +# Setup Git. |
| 52 | +RUN git config --unset-all "http.https://github.com/.extraheader" || { code=$?; [ "$code" = 5 ] || exit "$code"; } \ |
| 53 | + && git config --global --add safe.directory "/accelerated-computing-hub" |
53 | 54 |
|
54 | 55 | ENTRYPOINT ["/accelerated-computing-hub/brev/jupyter-start.bash"] |
0 commit comments