Initial Setup

Prerequisites

Python

module load migration-testing-spack/python/3.10.13

Install Toil

Create a python virtual environment

python3 -m venv venv

This will create python virtual environment folder called venv in your current working directory

Activate the virtual environment

circle-info

You need to activate the virtual environment in order to use it. Remeber this command, as you need to do this at the start of any session where you need to use Toil.

Update pip in the virtual environment

circle-check

Install toil in the virtual environment

Install latest version of Toil pip install toil[cwl]

Option 2 - Alternative Installation Methods

An alternative installation method using conda is included with the pluto-cwl repo herearrow-up-right.

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:

circle-info

Make sure to add the node path to your .profile so you don't need to load every time you log in to juno. You can get the full node path by running which node

Singularity

Setup the singularity cache:

Follow this link to setup the cache:

Setup Singularity cachechevron-right

Environment 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 cached

  • export SINGULARITYENV_LC_ALL=en_US.UTF-8

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'

Optional

The environment variables here are for informative purposes. Not recommended for first time users.

  • If you are automatically generating the cwl-cache

    • SINGULARITY_CACHEDIR

    • If 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 username

      • SINGULARITY_DOCKER_PASSWORD: Dockerhub login password

Create the demo CWL and yaml file hello.cwl:

file-download
285B

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

  1. Insert the toil command into a slurm script, such as hello-world.slurm

  1. Run command sbatch hello-world.slurm

  2. The standard output and standard error are directed to single.%j.out and single.%j.err where "%j" is replaced by the job number

circle-check

Last updated

Was this helpful?