Skip to content

Usage

phoenixcitoolkitpython's CI/CD pipelines generate containers that provide a ready-to-use environment for development and production. These containers are uploaded to phoenixcitoolkitpython's container registry. A set of containers is available for each branch in the repository, and the containers are re-build for any commit that involves modifications made to the pixi.toml or dockerfiles files (anything inside the docker directory).

For Users

The use of apptainer is recommended. To obtain the production image of the main branch use the following command:

apptainer pull docker gitlab.cta-observatory.org:5555/vincent.pollet/phoenixcitoolkitpython:main
This command will create a .sif file, which provides a ready-to-use phoenixcitoolkitpython environment

Warning

apptainer can use several GB of disk storage as cache when building the .sif file. The default cache is usually located in ~/.apptainer/cache. The location can be changed by setting the APPTAINER_CACHEDIR environment variable. The apptainer cache can be cleaned using apptainer cache clean.

Run phoenixcitoolkitpython

To run phoenixcitoolkitpython, you may need a configuration file. See the example here:
- Configuration File

You can now run phoenixcitoolkitpython using apptainer run. Since apptainer containers are read-only by default, you will need to mount the paths to your input and output files.

# Run phoenixcitoolkitpython in the container
# Parameters:
# Mounts: input (data and settings file) and output directories
apptainer run \
    --mount type=bind,source=/path/to/input/data_dir/,destination=/corresponding/path/in/container/ \
    main_latest.sif \
    bash -c "\
    $PYTHON $TRAIN_FILE --config_file $CONFIG_FILE_ENERGY  --gamma_file gamma.graphs --overwrite && \  #example of a command to run a training