22
33The GitHub contains an apptainer definition file ` container.def ` , from which the .sif file can be built using
44``` bash
5- apptainer build -F cytovanni-docker .sif container.def
5+ apptainer build -F cytovanni-container .sif container.def
66```
77It is then possible to run scripts within this container, which contains all necessary dependencies for the package, as well as CUDA support as long as it is running on a machine with a CUDA-enabled graphics card.
88
@@ -18,14 +18,14 @@ However, our preferred way is using this container as a Jupyter kernel.
1818For this, you need to create a script ` init_kernel.sh ` containing
1919``` bash
2020#! /bin/bash
21- apptainer exec --nv /path/to/cytovanni-docker .sif python -m ipykernel " $@ "
21+ apptainer exec --nv /path/to/cytovanni-container .sif python -m ipykernel " $@ "
2222```
2323` --nv ` enables the container to access the graphics card, and ` /path/to ` should be replaced by the correct path structure.
2424Apptainer automatically mounts the user directory; you can additionally mount other directories using ` --bind ` .
2525You then need to create a custom Jupyter kernel file, first by creating the folder
2626``` bash
27- mkdir -p ~ /.local/share/jupyter/kernels/cytovanni-docker
28- cd ~ /.local/share/jupyter/kernels/cytovanni-docker
27+ mkdir -p ~ /.local/share/jupyter/kernels/cytovanni-container
28+ cd ~ /.local/share/jupyter/kernels/cytovanni-container
2929```
3030and then add a file ` kernel.json ` with
3131``` json
@@ -35,18 +35,18 @@ and then add a file `kernel.json` with
3535 " -f" ,
3636 " {connection_file}"
3737 ],
38- "display_name" : " Python (Cytovanni Docker )" ,
38+ "display_name" : " Python (Cytovanni)" ,
3939 "language" : " python"
4040}
4141```
42- Copying ` logo-64x64.png ` into ` ~/.local/share/jupyter/kernels/cytovanni-docker ` will additionally add a nice icon in the Jupyter launcher.
42+ Copying ` logo-64x64.png ` into ` ~/.local/share/jupyter/kernels/cytovanni-container ` will additionally add a nice icon in the Jupyter launcher.
4343
4444This custom kernel can then be used just like any other Jupyter kernel.
4545
4646# R
4747We also provide ` Rcontainer.def ` to run CytoNorm. Compiling works the same way as above,
4848``` bash
49- apptainer build -F cytovanni-R-docker .sif Rcontainer.def
49+ apptainer build -F cytovanni-R-container .sif Rcontainer.def
5050```
5151along with ` kernel.json `
5252``` json
@@ -56,7 +56,7 @@ along with `kernel.json`
5656 " -f" ,
5757 " {connection_file}"
5858 ],
59- "display_name" : " R (Cytovanni Docker )" ,
59+ "display_name" : " R (Cytovanni)" ,
6060 "language" : " R"
6161}
6262```
@@ -70,5 +70,5 @@ for i in "$@"; do
7070 fi
7171 prev=" $i "
7272done
73- apptainer exec /path/to/cytovanni-R-docker .sif R --slave -e " IRkernel::main('${CONN_FILE} ')"
73+ apptainer exec /path/to/cytovanni-R-container .sif R --slave -e " IRkernel::main('${CONN_FILE} ')"
7474```
0 commit comments