Skip to content

Commit aae36c1

Browse files
committed
Updating information on interative apps
1 parent bb23645 commit aae36c1

File tree

4 files changed

+129
-2
lines changed

4 files changed

+129
-2
lines changed

docs/code-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# (VS)code server
1+
# (VS)Code server
22

33
The (VS)Code server allows you to use the (VS)Code editor on UBELIX from your
44
browser.

docs/img/modules-jupyter.png

75.6 KB
Loading

docs/jupyter.md

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,99 @@ browser.
1313
!!! warning
1414
The job may still be running if you close the window or log out. When you are done, shut down Jupyter by clicking `Delete` on the session under My Interactive Sessions. You can confirm that the interactive session has stopped by checking My Interactive Sessions.
1515

16+
At this point you should already have a fully working Jupyter environment. To start working with Jupyter Notebooks, please also see the [Jupyter Documentation](http://jupyter.readthedocs.io/en/latest/).
17+
18+
## Loading software modules
19+
20+
You can load additional software modules directly from within Jupyter using the
21+
modules extensions:
22+
23+
1. Choose the Module View from the left side panel
24+
2. Search for the desired module in the search top search bar
25+
3. Load/Unload modules as required
26+
27+
![modules-jupyter](img/modules-jupyter.png)
28+
29+
## Installing Python packages
30+
31+
A variety of standard Python packages (such as numpy, scipy, matplotlib and pandas) are available automatically. To see what packages are available, open a Terminal notebook or open a Terminal on UBELIX. Then load the Ananaconda3 module and list the installed packages:
32+
33+
```
34+
module load Anaconda3/2024.02-1
35+
eval "$(conda shell.bash hook)"
36+
conda list
37+
```
38+
39+
There should be no issues using conda or pip to install or upgrade packages and then use them in a Jupyter notebook, but you will need to make sure to install the new versions or additional packages in your home or scratch directories because you do not have write permissions to the module directories. If you'd like to install packages with `conda install` you'll need to create a conda environment in which to install packages and then create a kernel associated with your Conda environment as discussed in the next section. If you need just a few extra packages you can use `pip install --user <package>` to install the missing packages.
40+
41+
!!! tip
42+
We recommend using conda environments over pip installed packages as these
43+
are less prone to package conflicts during system upgrades. If you're
44+
experienced with Python virtualenvs you may choose these as well.
45+
46+
## Adding new kernels
47+
48+
Jupyter supports notebooks in dozens of languages, including IPython, R, Julia, etc. If you’d like to use a language not already present in the default Jupyter configuration, you’ll need to create your own kernel. You may also need to create your own kernel for a language already supported if you want to customize your environment. For example if you'd like to work in your conda environments when using your notebook.
49+
50+
### Adding a conda environment to Jupyter
51+
52+
You can add a new (Python) kernel to your Jupyter based on a conda environment. When in Jupyter, you will then be able to select the name from the kernel list, and it will be using the packages you installed. Follow these steps to do this (replacing `<env>` with the name you want to give your conda environment):
53+
54+
```
55+
conda activate <env>
56+
python -m ipykernel install --user --name <env>
57+
```
58+
59+
### Removing a conda environment from Jupyter
60+
61+
If you remove conda environments using `conda remove --name <env> --all` the
62+
Jupyter kernel is left behind leading to a broken kernel. You can remove the
63+
broken kernel using:
64+
65+
```
66+
jupyter kernelspec uninstall <unwanted-kernel>
67+
```
68+
69+
## Working with jupyter extensions
70+
71+
Since jupyter is installed in a location that is not writable by regular users,
72+
the Jupyter Extension Manager is read-only. This means you can't install,
73+
remove, enable or disable Jupyter extensions directly from the Extension Manager
74+
within Jupyter.
75+
76+
If you want to use custom jupyter extensions please follow the following
77+
procedure:
78+
79+
1. Load the Anaconda3 module that is used for OnDemand Jupyter:
80+
```
81+
module load Anaconda3/2024.02-1
82+
```
83+
2. Ensure the `pip` version matches the following:
84+
```
85+
$ which pip
86+
/software.9/software/Anaconda3/2024.02-1/bin/pip
87+
```
88+
3. Install a jupyterlab extension `<jupyterlab_extension>` ensuring it will be
89+
compatible with the OnDemand jupyter version (4.0.11):
90+
```
91+
pip install jupyterlab==4.0.11 <jupyter_extension> --user
92+
```
93+
!!! warning
94+
It is important that the jupyterlab version specified matches the version on
95+
the server (`jupyterlab==4.0.11`) exactly. Otherwise you might end up with a
96+
incomtatible versions that could prevent your notebook from starting.
97+
98+
If you no longer need an extension please remove it from your
99+
Jupyter using:
100+
101+
```
102+
pip uninstall <jupyter_extension>
103+
```
104+
105+
After stopping and restarting your server, when you return to the Jupyter page, you should see your extensions added or removed from the Extension Manager.
106+
16107
## Known limitations
17108

18-
*coming soon*
109+
- Extensions: It is not possible to enable/disable Jupyter extensions through
110+
the Extension manager. Please see the section
111+
[Working with jupyter extensions](#working-with-jupyter-extensions)

docs/rstudio.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,40 @@ The RStudio server allows you to use RStudio on UBELIX.
1212
!!! warning
1313
The job may still be running if you close the window or log out. When you are done, shut down RStudio by clicking `Delete` on the session under My Interactive Sessions. You can confirm that the interactive session has stopped by checking My Interactive Sessions.
1414

15+
## Loading software modules
16+
17+
If you need to load additional software modules within RStudio you can open a
18+
Terminal window within RStudio to use the familiar `module` commands. Note that
19+
you need to restart R from within RStudio to pickup the newly loaded modules.
20+
21+
Alternatively you can add additional module commands in the *Environment Setup*
22+
section of the RStudio submission form in the OnDemand portal, i.e,
23+
24+
```
25+
module load HDF/4.2.15-GCCcore-11.3.0
26+
```
27+
28+
## Installing R packages
29+
30+
A vast amount of core R packages are pre-installed centrally - you can see what is available by using the `library()` function within R. However, given the number of packages and multiple versions available, other packages should be installed by the user.
31+
32+
Installing R packages from CRAN is pretty straightforward thanks to install.packages() function. For instance:
33+
34+
```
35+
> install.packages(c("ggplot2", "dplyr"))
36+
```
37+
38+
By default, when you install R packages, R will try to install them in the central installation. Since this central installation is shared among all users on the cluster, it's obviously impossible to install directly your packages there. This is why this location is not writable and you will get this kind of message:
39+
40+
```
41+
> install.packages("ggplo2")
42+
Warning in install.packages("ggplo2") :
43+
'lib = "/software.9/software/R/4.2.1-foss-2022a/lib/R/library/"' is not writable
44+
Would you like to use a personal library instead? (yes/No/cancel)
45+
```
46+
47+
This is why you have to answer **yes** to this *"Would you like to use a personal library instead?"* question.
48+
1549
## Known limitations
1650

1751
- custom R versions, e.g. from Anaconda are not supported.

0 commit comments

Comments
 (0)