-
Notifications
You must be signed in to change notification settings - Fork 2
Using Docker container on LC Quartz
docker
command is not available in LC machines, but we can use singularity
as an alternative. For the official instructions, see HPC LLNL webpage.
To run the pylibrom_env
container on LC quartz, we first build the singularity image format (sif) file from the github registry:
singularity build pylibrom_env.sif docker://ghcr.io/llnl/pylibrom/pylibrom_env:latest
This builds the image file at the current directory. Run the container with singularity:
singularity shell ./pylibrom_env.sif
This will let us enter the container, sharing all the filesystem and environmental variables for the host. To further containerize, add the following flags:
singularity shell --container --cleanenv -B /host/path/to/pylibROM:/container/path/to/pylibROM ./pylibrom_env.sif
--container
and --cleanenv
will set the container not sharing any file or environmental variable. -B /host/path/to/pylibROM:/container/path/to/pylibROM
allows us to share only one directory in the container with the host directory:
- Change
/host/path/to/pylibROM
to the pylibROM repo path in your LC machine. - Change
/container/path/to/pylibROM
to any directory path that you'd like to locate pylibROM within the container.
Once you are in the container, you can try installing pylibROM:
pip install /container/path/to/pylibROM --global-option="--librom_dir=/env/dependencies/libROM" --verbose