Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
doku:jupyterhub [2022/02/11 12:35] – [Important Information: Resource Allocation] katrin | doku:jupyterhub [2023/09/13 07:52] – [Directly build a singularity/apptainer image] katrin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | The VSC offers a JupyterHub service available for all VSC users at [[https:// | + | The VSC offers a JupyterHub service available for all VSC users at [[https://jupyterhub.vsc.ac.at]] |
Login works with any cluster user (both VSC3 and VSC4) and uses the OTP like on the cluster. A VPN connection is not needed. | Login works with any cluster user (both VSC3 and VSC4) and uses the OTP like on the cluster. A VPN connection is not needed. | ||
Line 24: | Line 24: | ||
choose a profile: | choose a profile: | ||
* VSC-4 Singularity Image (this is the default) | * VSC-4 Singularity Image (this is the default) | ||
+ | * VSC-4 python venv | ||
+ | * VSC-4 conda python env | ||
* VSC-3 Singularity Image | * VSC-3 Singularity Image | ||
- | * VSC-3 GPU nodes - a singularity image with CUDA support (currently only GTX1080) | + | * VSC-3 GTX1080 |
- | * VSC-4 python venv - a python virtual environment | + | * VSC-3 A40 GPU Singularity Image |
* If you are participating in a training, there is most likely only a single fixed profile or special training profiles available | * If you are participating in a training, there is most likely only a single fixed profile or special training profiles available | ||
Line 67: | Line 70: | ||
To stop the server, click on ' | To stop the server, click on ' | ||
- | ===== FAQ ===== | + | ===== BYOI: Bring your own (Apptainer/ |
- | * **The OTP SMS says 'login at vsc3'? Is this an issue?** | + | It is possible to use a custom apptainer/ |
- | No this is a current | + | ==== Necessary Packages ==== |
+ | |||
+ | A good starting point for creating your own container | ||
+ | |||
+ | Apart from adding your own software the image also needs to have at least the following packages for it to be able to run in our JupyterHub environment: | ||
+ | < | ||
+ | # This package pulls in all the necessary dependencies to start a jupyter server | ||
+ | # Make sure this always matches the current | ||
+ | jupyterhub==3.1.1 | ||
+ | |||
+ | # This package provides functionality needed to run in the slurm environment | ||
+ | git+https:// | ||
+ | </ | ||
+ | |||
+ | In addition we usually also install the following jupyterlab extensions in our images but they are not strictly necessary and just provide extended functionality like memory monitoring for the user: | ||
+ | * jupyterlab-system-monitor | ||
+ | * jupyterlab-git | ||
+ | * jupyterlab-widgets | ||
+ | |||
+ | **An up 2 date list of packages can always be found in our repo: [[https:// | ||
+ | |||
+ | === Run hooks from / | ||
+ | |||
+ | If your image needs to run hooks before startup (e.g. the pyspark image depends on this [[https:// | ||
+ | |||
+ | Unfortunately the batchspawner package does not source them so we are using a custom startscript in our images called `vsc-singleuser.sh`. All it does is to run the hooks from `/ | ||
+ | |||
+ | The script can be found at [[https:// | ||
+ | |||
+ | Note: Contact us to get read rights to the repository. | ||
+ | |||
+ | ==== Build your own custom image from a docker image ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | If you already have a docker image you want to start from or if you are more familiar with docker image creation you can just use that image and create it into a singularity image after you are finished. | ||
+ | |||
+ | Note: Make sure that you use the right versions for the current version of our JupyterHub (the version is displayed at the bottom of the [[http:// | ||
+ | |||
+ | After selecting / building the docker image all that needs to be done is to convert it into a **singularity image**. | ||
+ | |||
+ | You can do this by executing the following lines (assuming your docker image is named " | ||
+ | < | ||
+ | singularity build my_image.sif docker:// | ||
+ | </ | ||
+ | |||
+ | See the documentation for more examples: [[https:// | ||
+ | |||
+ | When the conversion process has finished make sure that the resulting " | ||
+ | |||
+ | Note: the conversion can be done on our cluster since we have singularity installed on our nodes. | ||
+ | |||
+ | ==== Directly build a singularity/ | ||
+ | |||
+ | Instead of starting with docker you can also directly build a singularity image that is ready to use with our JupyterHub instance. | ||
+ | |||
+ | For this you need to create a so called " | ||
+ | |||
+ | Here is a minimal example using the datascience docker stacks image as a basis: | ||
+ | < | ||
+ | BootStrap: docker | ||
+ | From: jupyter/ | ||
+ | |||
+ | %post | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | If we save the file as " | ||
+ | |||
+ | Please | ||
+ | |||
+ | * VSC4: module load --auto apptainer/ | ||
+ | * VSC5: module load --auto apptainer/ | ||
+ | |||
+ | |||
+ | < | ||
+ | # load an apptainer module (see above) | ||
+ | module load --auto apptainer/< | ||
+ | |||
+ | # build the image | ||
+ | apptainer build my_image.sif my_image.def | ||
+ | </ | ||
+ | |||
+ | If you cannot use the versions provided on VSC you can of course also build the image on your own machine and upload it the VSC. | ||
+ | |||
+ | ===== FAQ ===== | ||
* **My Server instance is stuck and I get a timeout when I try to reload the window. Going to the VSC jupyterhub website also results in a timeout.** | * **My Server instance is stuck and I get a timeout when I try to reload the window. Going to the VSC jupyterhub website also results in a timeout.** | ||
- | In order to to control the running instance, navigate directly to the following URL: [[https:// | + | In order to to control the running instance, navigate directly to the following URL: [[https://jupyterhub.vsc.ac.at/ |