Skip to content

Commit 2ebfd9d

Browse files
committed
container
1 parent 081a85b commit 2ebfd9d

2 files changed

Lines changed: 12 additions & 13 deletions

File tree

container/container.def

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ From: pytorch/pytorch:2.8.0-cuda12.9-cudnn9-devel
55
pip install --no-cache-dir uv
66

77
uv pip install --system jupyter ipykernel
8-
uv pip install --system numpy pandas flowkit flowutils readfcs matplotlib seaborn scipy scikit-learn anndata statsmodels Pillow
9-
uv pip install --system pykeops geomloss
8+
uv pip install --system cytovanni[all]
109

1110
# custom packages
12-
uv pip install --system datashader colorcet
11+
uv pip install --system
1312

1413
python -m ipykernel install --user --name=cytovanni-docker --display-name "Python (Cytovanni-docker)"
1514

@@ -27,7 +26,7 @@ From: pytorch/pytorch:2.8.0-cuda12.9-cudnn9-devel
2726

2827
%labels
2928
Author valentinwust
30-
Version v0.3.1
29+
Version v1.0.0
3130

3231
%help
3332
Container that can run all parts of Cytovanni.

container/container.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The 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
```
77
It 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.
1818
For 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.
2424
Apptainer automatically mounts the user directory; you can additionally mount other directories using `--bind`.
2525
You 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
```
3030
and 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

4444
This custom kernel can then be used just like any other Jupyter kernel.
4545

4646
# R
4747
We 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
```
5151
along 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"
7272
done
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

Comments
 (0)