Setup Singularity cache
Manually pre-cache with docker_extract (Recommended)
Setup singularity cache
You can configure the cache by setting the CWL_SINGULARITY_CACHE
env variable.
If you are on juno
:
juno
:For argos-cwl the cache is already setup:
export CWL_SINGULARITY_CACHE=/juno/work/ci/cwl_singularity_cache
If you are using another cwl or you want to generate your own cache:
Create a folder for your cache and set it to [cache]
in this template. It must be in /juno/work
if you want to use lsf
/juno/work/ci/docker_extract/update_cache.sh -s [cache] -c [cwl_path]
export CWL_SINGULARITY_CACHE=[cache]
If you are not on juno
or you want to set up the cache manually:
juno
or you want to set up the cache manually:Create a new venv, source it and upgrade pip
python3 -m venv cwl_utils_venv
source cwl_utils_venv/bin/activate
pip install --upgrade pip
Install cwl-utils
pip install "git+https://github.com/mskcc/cwl-utils.git"
Load singularity
module load singularity/3.7.1
Create the cache
mkdir [cache]
docker_extract.py -s [cache] [path_to_cwl]
If you are getting command not found for docker_extract.py
, make sure the bin folder venv/bin
of the virtual envirornmnet is in your path.
If you are getting errors, your local singularity files might be corrupted. Try deleting your local files by running rm -r ~/.singularity
Setup automatic cache generation
CWL can also build the cache dynamically as it is running the workflow. In our experience, this can have issues if you have new images that need to be added to the cache
export SINGULARITY_CACHEDIR=$PWD/singularity_cache
Last updated
Was this helpful?