Initial Setup
Prerequisites
Python
module load migration-testing-spack/python/3.10.13
module load python/3.7.1
Install Toil
Option 1 - Install Toil in Python Virtual Environment [Recommended for first time users]
Create a python virtual environment
python3 -m venv venvThis will create python virtual environment folder called venv in your current working directory
Activate the virtual environment
Update pip in the virtual environment
This step only needs to be done once per virtual environment
Install toil in the virtual environment
Install latest version of Toil
pip install toil[cwl]
Install toil version 5.4.3
Modify process.py file
Option 2 - Alternative Installation Methods
An alternative installation method using conda is included with the pluto-cwl repo here.
Resources:
Install Node.js
Check if node is installed on your system with which node
If Node is not installed. Create a node folder in your shared workspace (/work/... on juno).
In the node folder run:
Singularity
Setup the singularity cache:
Follow this link to setup the cache:
Setup Singularity cacheEnvironment Variables
The following environment variables should be set before running a CWL pipeline
Required
export CWL_SINGULARITY_CACHE=[cache]: as shown above, a directory with read/write access where Singularity containers are cachedexport SINGULARITYENV_LC_ALL=en_US.UTF-8
Recommended
If you have an sla or specific LSF or SLURM requirements, you can configure toil to pass extra arguments to its worker jobs
TOIL_SLURM_ARGS: Arguments for sbatch for the SLURM batch system
Example: export TOIL_SLURM_ARGS='--partition test01'
TOIL_LSF_ARGS: Extra args added to the bsub on TOIL jobs
Example: export TOIL_LSF_ARGS='-sla CMOPI'
Optional
The environment variables here are for informative purposes. Not recommended for first time users.
If you are automatically generating the cwl-cache
SINGULARITY_CACHEDIRIf you are running a large pipeline you might need to set up dockerhub authentication, so you do not hit the rate limit
SINGULARITY_DOCKER_USERNAME: Dockerhub login usernameSINGULARITY_DOCKER_PASSWORD: Dockerhub login password
Create the demo CWL and yaml file hello.cwl:
hello.yaml
The file is also on the file system:
/juno/work/ci/first_time_setup/hello.cwl
Pull Singularity container and then run the CWL
Insert the toil command into a slurm script, such as
hello-world.slurm
Run command
sbatch hello-world.slurmThe standard output and standard error are directed to
single.%j.outandsingle.%j.errwhere "%j" is replaced by the job number
Pull Singularity container and then run the CWL
If you get the response Hello World, you are all set! Congrats you finished your first cwl run!
Last updated
Was this helpful?