This repository contains a definition file for a companion Apptainer/Singularity image to run scripts and notebooks in gerlichlab/takacs_mylarshchikov_et_al, as well as instructions how to download a prebuilt image, run JupyterLab, and execute scripts.
First, pull the Apptainer/Singularity image from Docker Hub:
apptainer pull oras://registry-1.docker.io/gerlichlab/replchromconf-jupyterlab:v0.2
It will download the image as a file replchromconf-jupyterlab_v0.2.sif in the current directory.
Next, launch JupyterLab with apptainer:
apptainer exec replchromconf-jupyterlab_v0.2.sif jupyter lab --ip 0.0.0.0 --port 8888
Follow the instructions in the terminal.
- Choose "JupyterLab based on custom Singularity image" (if supported by JupyterHub).
- Paste the path to the image file in sif format.
- Press "Start".
To execute scripts with conda environment in the image, a wrapper script is needed to activate the conda environment.
First, pull the Apptainer/Singularity image from Docker Hub:
apptainer pull oras://registry-1.docker.io/gerlichlab/replchromconf-jupyterlab:v0.2
It will download the image as a file replchromconf-jupyterlab_v0.2.sif in the current directory.
Next, create a wrapper script named run.sh with the following contents:
# active conda env in the container
source /srv/conda/etc/profile.d/conda.sh
conda activate notebook
# your code here
...
Finally, run the wrapper script with:
apptainer run replchromconf-jupyterlab_v0.2.sif /bin/bash run.sh
This approach works both locally and on HPC clusters with job schedulers, such as SLURM.
Images are built using repo2docker internally at VBC using Jenkins as CI. Currently, only Apptainer/Singularity images are available.
The image is hosted on DockerHub, latest tag v0.2 (Apptainer/Singularity image, not Docker!)
Internally, images are hosted on VBC Singularity registry: Singularity image URL.
Built images are available at: /groups/gerlich/labinfo/Methods/singularity_images/
- All necessary packages preinstalled (except for OnTAD — have to build yourself)
- anywidget
- jupyterlab_materialdarker theme
Original environment.yml file. The environment.yml file in this repo is used after the original one.