Skip to content

CWL Runner Installation

The recommended CWL runner is cwltool, the reference implementation for the CWL standards.

The installation on Windows can be done following the guide here.

  1. Install Windows Subsystem for Linux from the Microsoft Store

    WSL

  2. Install Debian from the Microsoft Store

    Debian

  3. Set Debian as your default WSL 2 distro:

    • Open Windows PowerShell
    • Type wsl --set-default debian and hit enter
  4. Install Docker Desktop for Windows

    • Start Docker Desktop and Navigate to Settings
    • Select “Use WSL 2 based engine” in the general tab and apply Docker WSL2
    • Select “Enable Integration with my default distro” in the resources tab under WSL Integration Docker WSL Integration
  5. Start WSL:

    • Open Windows PowerShell
    • Type wsl and hit enter
    • You may need to specify a username and password if this is your first time using WSL (the password doesn’t show when typing, just type and hit enter)
  6. Follow the Instructions for Linux (Debian/Ubuntu) in this tutorial

  • If you are on Windows, start the WSL
  • Activate the virtual environment source env/bin/activate
    • If you want to activate the environment from a different location, you must enter the full path to the installation location
      • e.g. if you installed it in your home directory, you would use source /home/username/env/bin/activate
  • Run cwltool by specifying the CWL Workflow or CommandLineTool description file path and the (optional) inputs file path (you can use relative or full paths):
Terminal window
cwltool path/to/cwlfile.cwl path/to/jobfile.yml
  • If you are in an ARC, you can navigate to the runs folder and type wsl in the address line to start the WSL at that location and execute a typical run after activating the virtual environment (see second step) with the command:
Terminal window
cwltool ./myRun/run.cwl ./myRun/run.yml
  • CWL copies the relevant files to temporary directories located on the disc where your WSL is installed. If you want them on a different disk for perfomrance/size reasons, you can use the --tmpdir-prefix and --tmp-outdir-prefix options to specify the location of the temporary directories:
Terminal window
cwltool --tmp-outdir-prefix=/mnt/c/Users/myUser/Tempdir/ --tmpdir-prefix=/mnt/c/Users/myUser/Tempdir/ ./myRun/run.cwl ./myRun/run.yml

Here is a very simplified example to check, that your cwltool installation functions

  1. Store the following as echo-tool.cwl

    #!/usr/bin/env cwl-runner
    cwlVersion: v1.2
    class: CommandLineTool
    baseCommand: [echo]
    stdout: message.txt
    inputs:
    message:
    type: string
    inputBinding:
    position: 1
    outputs:
    output:
    type: stdout
  2. In the same folder, store the following as job.yml

    message: "I love ARCs and CWL"
  3. Now you can execute the tool

    • providing an input directly via CLI:
    cwltool echo-tool.cwl --message "ARCs are great"

    or

    • providing the input via the job.yml:
    cwltool echo-tool.cwl job.yml
  4. Both create an output file called message.txt with your specified message.