Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPC_Tutorials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
patmjen
HPC_Tutorials
Commits
e646fe92
Commit
e646fe92
authored
2 years ago
by
patmjen
Browse files
Options
Downloads
Patches
Plain Diff
Add more formatting
This hopefully makes it easier to spot what's an actual step in the and what is extra info.
parent
a443d9b2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
HPC_Python_Guide.md
+38
-38
38 additions, 38 deletions
HPC_Python_Guide.md
with
38 additions
and
38 deletions
HPC_Python_Guide.md
+
38
−
38
View file @
e646fe92
...
...
@@ -48,11 +48,11 @@ a100sh
```
You should now be able to install packages with pip install
<PACKAGE>
as normal.
If pip doesn't work, you may need to manually install it with:
```
easy_install pip
```
To run python, remember to use the
`python3`
command.
> __Troubleshooting:__ If pip doesn't work, you may need to manually install it with:
> ```
> easy_install pip
> ```
## III. Virtualenv activation
...
...
@@ -74,23 +74,23 @@ To run python, remember to use the `python3` command.
source <VENV_NAME>/bin/activate
```
__Pro tip:__
To make life easy, put these commands in a bash script called
`init.sh`
:
```
#!/bin/bash
module load python3/3.8.9
module load numpy/1.19.5-python-3.8.9-openblas-0.3.13
module load scipy/1.5.4-python-3.8.9
module load cuda/11.0
source
<VENV_NAME>/bin/activate
```
which you can then run by entering:
```
source init.sh
```
and this will prepare everything
>
__Pro tip:__ To make life easy, put these commands in a bash script called `init.sh`:
>
```
>
#!/bin/bash
>
module load python3/3.8.9
>
module load numpy/1.19.5-python-3.8.9-openblas-0.3.13
>
module load scipy/1.5.4-python-3.8.9
>
module load cuda/11.0
>
>
source <VENV_NAME>/bin/activate
>
```
>
>
which you can then run by entering:
>
```
>
source init.sh
>
```
>
>
and this will prepare everything
## IV. Jupyter notebooks on ThinLinc
...
...
@@ -122,12 +122,12 @@ and this will prepare everything
jupyter lab
```
This should open a browser with the Jupyter lab interface.
Sometimes this
has some issues and
one then
need to revert to Jupyter notebooks.
> __Troubleshooting:__ Sometimes Jupyter lab
has some issues and
you
need to revert to Jupyter notebooks.
## V. Jupyter notebooks on the cluster in your own browser
**
WARNING:
**
This will be a bit involved...
Credit goes to Niels Jeppesen who figured all this out.
> __
WARNING:
__
This will be a bit involved...
>
Credit goes to Niels Jeppesen who figured all this out.
1.
Open a terminal on the cluster, either through ThinLinc or ssh.
...
...
@@ -136,12 +136,12 @@ Credit goes to Niels Jeppesen who figured all this out.
```
tmux
```
This way,
_
**
i
f you lose your internet connection**
_ your notebook will keep running.
You can _
**reconnect**
_ to the tmux session by running:
```
tmux attach
```
in a terminal on the cluster.
>
_**
I
f you lose your internet connection**_ your notebook will keep running.
>
You can _**reconnect**_ to the tmux session by running:
>
```
>
tmux attach
>
```
>
in a terminal on the cluster.
3.
Take note of the node's hostname. You can see this by running:
```
...
...
@@ -176,14 +176,14 @@ Credit goes to Niels Jeppesen who figured all this out.
This should open the Jupyter interface. Any commands you run will be executed on the HPC
cluster.
**NOTE:**
If no URL beginning with
`127.0.0.1`
was printed in step 5, change the first part
manually to
`127.0.0.1`
before entering it in your browser. In the example from step 5, you
would change
`n-62-20-9`
to
`12.0.0.1`
.
>
**NOTE:** If no URL beginning with `127.0.0.1` was printed in step 5, change the first part
>
manually to `127.0.0.1` before entering it in your browser. In the example from step 5, you
>
would change `n-62-20-9` to `12.0.0.1`.
If you close your browser, you can reconnnect by entering the URL again.
If you lose your internet connection, you can reconnect by repeating steps 5 and 6.
**NOTE:**
You can make inline plots in the notebook, but cannot open new windows for plotting.
The closest you can get is by starting the server on a ThinLinc node with X11 forwarding.
This will allow you to have the notebook in your own browser, but new windows will be opened
in ThinLinc.
>
**NOTE:** You can make inline plots in the notebook, but cannot open new windows for plotting.
>
The closest you can get is by starting the server on a ThinLinc node with X11 forwarding.
>
This will allow you to have the notebook in your own browser, but new windows will be opened
>
in ThinLinc.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment