Skip to content

Commit 95f964f

Browse files
committed
Add the Nsight Jupyter plugin.
1 parent 05c3806 commit 95f964f

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

build/docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ services:
2020
- "0.0.0.0:8888:8888" # JupyterLab
2121
volumes:
2222
- /home/ubuntu/pyhpc-tutorial:/pyhpc-tutorial
23+
- /var/run/docker.sock:/var/run/docker.sock
24+
- /usr/bin/docker:/usr/bin/docker
2325
user: root
26+
group_add:
27+
- docker
2428
working_dir: /pyhpc-tutorial/notebooks
2529
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=''"]
2630
restart: unless-stopped

build/dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ WORKDIR /pyhpc-tutorial/notebooks
77
RUN pip install --root-user-action ignore -r /pyhpc-tutorial/build/requirements.txt \
88
&& git config --unset-all "http.https://github.com/.extraheader" || { code=$?; [ "$code" = 5 ] || exit "$code"; } \
99
&& git config --global --add safe.directory "/pyhpc-tutorial" \
10-
&& mkdir -p ~/.jupyter \
10+
&& mkdir ~/.jupyter \
1111
&& mkdir -p ~/.local/state/._bash_history \
12-
&& ln -fs /pyhpc-tutorial/build/jupyter_server_config.py ~/.jupyter/jupyter_server_config.py
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
14+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"ui": {
3+
"enabled": true,
4+
"suppressServerAddressWarning": true,
5+
},
6+
"nsys": {
7+
"installationPath": "/usr/local/cuda",
8+
"args": "--trace=cuda,nvtx,osrt --python-sampling=true --python-backtrace=cuda --cudabacktrace=all",
9+
},
10+
"ncu": {
11+
"installationPath": "/usr/local/cuda",
12+
}
13+
}

build/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ opencv-python
77

88
# Jupyter
99
jupyter
10+
jupyterlab-nvidia-nsight
1011

1112
# CUDA
1213
cuda-python == 12.9.1 # cuda.{core, bindings, cooperative, parallel}, numba.cuda

0 commit comments

Comments
 (0)