Skip to content
Snippets Groups Projects
README 2.21 KiB
## Build container

### Login

Login via: `docker login hub.cbm.gsi.de`

### Build Images

Currently 3 images are build, each depending on the previous one(s):
1. `online_dev`: Contains all files to compile the CbmRoot online-code. This includes:
    - Subset of FairSoft packages (boost, root, fmt)
    - ROCm GPU compiler + hip development packages
    - Various system libraries (+ header)
2. `online_runtime`: Minimal container that only contains libraries required to run
  online reconstruction
3. `cbm_online`: Runnable container. Consists of `online_runtime` + cbm online binaries

Each image is accompanied by a `build_and_push.sh` script, that builds the image
and pushes it to the container registry.

To rebuild and publish the base images:
```
cd online_dev
./build_and_push.sh
cd ../online_runtime
./build_and_push.sh
```

Building the online code and creating a new image, happens inside a container via kaniko.
To build new cbm_online-images locally, you first have to create a new build-image:
```
cd <CbmRoot>
./algo/containers/cbm_online/make_build_image.sh <gitlab_user> <gitlab_password>
```
**This will store your password in plain text in the container. Make sure to delete after you're done.**

Then run the new container, to build a new cbm_online-image:
```
docker run -it --rm cbm_online_builder
```

This will push a new container image `cbm_online:<gitlab_user>-debug` to the CbmRoot registry.

You can use `test_run.sh` or `test_run_gpu.sh` scripts to test the image locally.
Make sure to pull the new image first with: `docker pull hub.cbm.gsi.de/computing/cbmroot/cbm_online:<gitlab_user>-debug`

## Test on virgo

### Login

Login via: `apptainer remote login -u <user> docker://hub.cbm.gsi.de`

`<user>` should be your gitlab-username. apptainer will ask for your password.

### Pull new images

`apptainer pull docker://hub.cbm.gsi.de/fweig/containers/cbm_online:<tag>`

Use `master` as tag to pull the current CbmRoot master. Use `mr<N>` to pull the container for
MR `N`.

### Run on debug partition

Run the container on the virgo debug partition with GPUs:

```srun --constraint=mi50 -p debug apptainer exec cbm_online.sif cbmreco -p /lustre/cbm/online/params -i /lustre/cbm/online/data/2391_node8_0_0000.tsa -d hip0 -n1```