Skip to content

Commit bc47228

Browse files
committed
nvmath Python: Re-add accidentally deleted Dockerfile.
1 parent 3b0ff0e commit bc47228

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

tutorials/nvmath-python/brev/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM ghcr.io/nvidia/mirrors/pytorch-2.9.0-cuda12.8-cudnn9-runtime
2+
3+
ENV PIP_ROOT_USER_ACTION=ignore \
4+
ACH_TUTORIAL=nvmath-python
5+
6+
# Copy only requirements.txt first for better Docker layer caching.
7+
COPY tutorials/${ACH_TUTORIAL}/brev/requirements.txt /opt/requirements.txt
8+
9+
RUN set -ex \
10+
&& `# Install Python packages` \
11+
&& pip install --no-cache-dir --root-user-action=ignore -r /opt/requirements.txt \
12+
&& rm -f /opt/requirements.txt \
13+
&& `# Install system packages` \
14+
&& apt-get update -y \
15+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git-lfs \
16+
&& apt-get clean -y \
17+
&& rm -rf /var/lib/apt/lists/* \
18+
&& `# Setup Bash` \
19+
&& mkdir -p ~/.local/state/._bash_history \
20+
&& `# Setup JupyterLab` \
21+
&& mkdir -p ~/.jupyter \
22+
&& ln -fs /accelerated-computing-hub/brev/jupyter-server-config.py ~/.jupyter/jupyter_server_config.py \
23+
&& mkdir -p ~/.ipython/profile_default/startup \
24+
&& ln -fs /accelerated-computing-hub/brev/ipython-startup-add-cwd-to-path.py ~/.ipython/profile_default/startup/00-add-cwd-to-path.py \
25+
&& python -m jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
26+
27+
COPY . /accelerated-computing-hub
28+
29+
WORKDIR /accelerated-computing-hub/tutorials/${ACH_TUTORIAL}/notebooks
30+
31+
RUN `# Setup Git` \
32+
&& git config --unset-all "http.https://github.com/.extraheader" || { code=$?; [ "$code" = 5 ] || exit "$code"; } \
33+
&& git config --global --add safe.directory "/accelerated-computing-hub"
34+
35+
ENTRYPOINT ["/accelerated-computing-hub/brev/jupyter-start.bash"]

0 commit comments

Comments
 (0)