Skip to content

Commit

Permalink
Merge pull request #39 from carlos-encs/jupyter
Browse files Browse the repository at this point in the history
Jupyter: tunnel and examples - updated
  • Loading branch information
smokhov authored Mar 7, 2024
2 parents 8301ce2 + 71a7eda commit 1c4e886
Show file tree
Hide file tree
Showing 11 changed files with 820 additions and 325 deletions.
Binary file added doc/images/putty1-old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/putty1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/putty2-old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/putty2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/speed-manual.pdf
Binary file not shown.
Binary file modified doc/web/images/putty1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/web/images/putty2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
667 changes: 347 additions & 320 deletions doc/web/index.html

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions doc/web/speed-manual.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ div.par-math-display, div.math-display{text-align:center;}
body{ margin:1em auto; max-width:80ch; padding:0 .62em; }
h1,h2,h3,h4,h5 { line-height:1.2; }
@media print{ body{ max-width:none } }
.partHead, likepartHead { font-size: 2em; }
.chapterHead, likechapterHead { font-size: 1.7411em; }
.sectionHead, likesectionHead { font-size: 1.5157em; }
.subsectionHead, likesubsectionHead { font-size: 1.3195em; }
.subsubsectionHead, likesubsubsectionHead { font-size: 1.1487em; }
.partHead, .likepartHead { font-size: 2em; }
.chapterHead, .likechapterHead { font-size: 1.7411em; }
.sectionHead, .likesectionHead { font-size: 1.5157em; }
.subsectionHead, .likesubsectionHead { font-size: 1.3195em; }
.subsubsectionHead, .likesubsubsectionHead { font-size: 1.1487em; }
@media (prefers-color-scheme: dark) { img[src^="speed-manual"]{filter: invert(1); } }
li p.indent { text-indent: 0em }
li p:first-child{ margin-top:0em; }
Expand Down Expand Up @@ -168,6 +168,10 @@ div.author{white-space: nowrap;}
div.abstract p {margin-left:5%; margin-right:5%;}
div.abstract {width:100%;}
.abstracttitle{text-align:center;margin-bottom:1em;}
.subsectionToc, .likesubsectionToc {margin-left:1em;}
.subsubsectionToc, .likesubsubsectionToc {margin-left:2em;}
.paragraphToc, .likeparagraphToc {margin-left:3em;}
.subparagraphToc, .likesubparagraphToc {margin-left:4em;}
figure.float, div.figure {margin-left: auto; margin-right: auto;}
figure.figure {text-align:center;}
figcaption.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:center;}
Expand Down
16 changes: 16 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ run certcain things.
+ [Configuration and execution](#configuration-and-execution)
* [CUDA](#cuda)
+ [Special Notes for sending CUDA jobs to the GPU Partition (`pg`)](#special-notes-for-sending-cuda-jobs-to-the-gpu-partition-pg)
+ [Jupyter notebook example: Jupyter-Pytorch-CUDA](#jupyter-example-gpu-pytorch)
* [Python Modules](#python-modules)

<!-- TOC end -->
Expand Down Expand Up @@ -405,6 +406,21 @@ We have several versions of CUDA installed in:

For CUDA to compile properly for the GPU queue, edit your `Makefile` replacing `/usr/local/cuda` with one of the above.

<!-- TOC --><a name="jupyter-example-gpu-pytorch"></a>
### Jupyter notebook example: Jupyter-Pytorch-CUDA

Example prepared to run on speed, extracted from: https://developers.redhat.com/learning/learn:openshift-data-science:configure-jupyter-notebook-use-gpus-aiml-modeling/resource/resources:how-examine-gpu-resources-pytorch

From speed-submit:
- Download `gpu-ml-model.ipynb` from this github to your `/speed-scratch/$USER space`
- `salloc --mem=10Gb --gpus=1`

From the node (interactive session):
- `module load singularity/3.10.4/default`
- `srun singularity exec -B $PWD\:/speed-pwd,/speed-scratch/$USER\:/my-speed-scratch,/nettemp --env SHELL=/bin/bash --nv /speed-scratch/nag-public/jupyter-pytorch-cuda.sif /bin/bash -c '/opt/conda/bin/jupyter notebook --no-browser --notebook-dir=/speed-pwd --ip="*" --port=8888 --allow-root'`
- Follow the steps described in: https://nag-devops.github.io/speed-hpc/#jupyter-notebooks
- When Jupyter is running on the browser, open `gpu-ml-model.ipynb` and run each cell

<!-- TOC --><a name="python-modules"></a>
## Python Modules

Expand Down
448 changes: 448 additions & 0 deletions src/gpu-ml-model.ipynb

Large diffs are not rendered by default.

0 comments on commit 1c4e886

Please sign in to comment.