Feat/readme
Compare changes
+ 148
− 58
We use [Apptainer](https://apptainer.org/docs/user/main/index.html) to build/run containers on our HPC systems.
You will need a Linux system to run Apptainer natively on your machine, and it’s easiest to [install](https://apptainer.org/docs/user/main/quick_start.html) if you have root access.
@@ -17,7 +156,7 @@ Containers are built via a [definition file](https://apptainer.org/docs/user/lat
@@ -17,7 +156,7 @@ Containers are built via a [definition file](https://apptainer.org/docs/user/lat
In each folder of this repo you will find a definition `.def` file and a `README.md` that describes the exact build command.
You can easily [pull containers](https://apptainer.org/docs/user/latest/docker_and_oci.html#containers-from-docker-hub)
@@ -26,7 +165,7 @@ from the [Docker Hub](https://hub.docker.com/) or other OCI registries:
@@ -26,7 +165,7 @@ from the [Docker Hub](https://hub.docker.com/) or other OCI registries:
You can also [convert images/containers](https://apptainer.org/docs/user/latest/docker_and_oci.html#containers-from-docker-hub) running in your Docker Daemon:
@@ -76,18 +215,18 @@ You can apply overlays with the `run`, `exec`, `shell` and `instance start` comm
@@ -76,18 +215,18 @@ You can apply overlays with the `run`, `exec`, `shell` and `instance start` comm
The [Remote Visualisation Service (RVS)](https://docs.mpcdf.mpg.de/doc/visualization/index.html) allows you to run Jupyter sessions on the HPC systems.
You can use your container as a kernel within such a session by providing a `kernel.json` spec file.
@@ -124,52 +263,3 @@ The next time you request a jupyter session, you can choose the generic jupyter
@@ -124,52 +263,3 @@ The next time you request a jupyter session, you can choose the generic jupyter
If you want to access files outside your home directory, you have to bind them explicitly in the kernel spec file when calling the apptainer command.
**TODO: The sandbox option does not work 100% correctly for VSCode or PyCharm, use docker images instead! Need to update this guide!**
A nice workflow to develop a python library locally and deploy it on our HPO systems (sharing exactly the same environment) is to use the [*sandbox* feature](https://apptainer.org/docs/user/main/build_a_container.html#sandbox) of Apptainer.
We are still investigating if something similar is possible with `Docker` (please let us know if you find a way :) ).
This definition file should reflect your environment in which you want your library to develop and use.
Now we can add our library that we develop to the sandbox environment and install it in [`editable`](https://setuptools.pypa.io/en/latest/userguide/development_mode.html) mode:
You should be able to point the interpreter of your IDE (VSC, PyCharm, etc.) to the python executable inside the sandbox folder.
While in principle you could build a SIF container directly from your sandbox, it is better to modify your *definition* `*.def` file to include your library/package.