Skip to content

Commit 34175ce

Browse files
committed
Change Docker image to launch a startup script instead of invoking Jupyter itself in Docker compose.
1 parent ae5bfec commit 34175ce

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

build/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ services:
2222
- /home/ubuntu/pyhpc-tutorial:/pyhpc-tutorial
2323
user: root
2424
working_dir: /pyhpc-tutorial/notebooks
25-
command: ["/bin/bash", "-lc", "exec python -m jupyter lab --allow-root --ip=0.0.0.0 --no-browser --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.default_url=''"]
2625
restart: unless-stopped
2726
nsight-streamer:
2827
image: nvcr.io/nvidia/devtools/nsight-streamer-nsys:2025.3.1

build/dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RUN pip install --root-user-action ignore -r /pyhpc-tutorial/build/requirements.
99
&& git config --global --add safe.directory "/pyhpc-tutorial" \
1010
&& mkdir -p ~/.jupyter/lab/user-settings/jupyterlab-nvidia-nsight \
1111
&& mkdir -p ~/.local/state/._bash_history \
12-
&& ln -fs /pyhpc-tutorial/build/jupyter_server_config.py ~/.jupyter/jupyter_server_config.py \
13-
&& ln -fs /pyhpc-tutorial/build/jupyter_nsight_plugin_settings.json ~/.jupyter/lab/user-settings/jupyterlab-nvidia-nsight/plugin.jupyterlab-settings
12+
&& ln -fs /pyhpc-tutorial/build/jupyter_server_config.py ~/.jupyter/jupyter_server_config.py
13+
14+
CMD ["/pyhpc-tutorial/build/jupyter-start.bash"]
1415

build/jupyter-start.bash

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
/pyhpc-tutorial/build/jupyter-generate-nsight-plugin-settings.bash > ~/.jupyter/lab/user-settings/jupyterlab-nvidia-nsight/plugin.jupyterlab-settings
4+
5+
exec python -m jupyter lab \
6+
--allow-root \
7+
--ip=0.0.0.0 \
8+
--no-browser \
9+
--NotebookApp.token='' \
10+
--NotebookApp.password='' \
11+
--NotebookApp.default_url=''"
12+

0 commit comments

Comments
 (0)