Skip to content

Latest commit

 

History

History
142 lines (104 loc) · 5.64 KB

windowsdoc.md

File metadata and controls

142 lines (104 loc) · 5.64 KB

Windows Compatibility

The CWL reference runner, cwltool, is compatible with Microsoft Windows when Docker is installed. On Windows, all CWL CommandLineTools are executed using Docker software containers. The default Docker Container is Alpine with Bash support. You can specify other Docker Containers for your tools and workflows using hints, requirements), or the --default-container cwltool option.

Supported Windows versions

If you are using Docker Toolbox, then you must run cwltool in the Docker Quickstart Terminal.

Installation

You can install cwltool using pip or directly from source code.

Requirements

Before installing cwltool, please install:

Install using pip (recommended)

pip install cwltool

Install from source

git clone https://github.com/common-workflow-language/cwltool.git
cd cwltool
pip install .

Note: In order to test if cwltool has been successfully installed on your Windows system, run cwltool in cmd. If you see help instructions, cwltool was successfully installed.

   CWL document required, no input file was provided
   usage: cwltool [-h] [--basedir BASEDIR] [--outdir OUTDIR] [--no-container]
                  [--preserve-environment ENVVAR] [--preserve-entire-environment]
                  [--rm-container | --leave-container]
                  [--tmpdir-prefix TMPDIR_PREFIX]
                  .......................

Running tests

There are two types of tests available for cwltool: unit tests and conformance tests.

Unit tests

To run cwltool's unit tests, run the following command:

python3 -m pytest --pyarg cwltool

Or go to the checkout of the cwltool Git repository on your system and run:

python3 setup.py test

Conformance tests

To run the CWL conformance tests, follow these instructions:

pip install cwltest
git clone https://github.com/common-workflow-language/common-workflow-language.git
cd common-workflow-language/v1.0
cwltest --test conformance_test_v1.0.yaml -j 4 --tool cwltool

The -j options is used to run multiple tests in parallel.

Troubleshooting

You may encounter some problems with Docker on Windows.

Docker doesn't work on Windows, even outside cwltool

Make sure you followed all instructions carefully while installing Docker. Please check the Environment variables. If the problem persists, we recommend consulting the online Docker Community.

Your local drives are not being shared with Docker Containers

  • On native Docker for Windows (supported by Windows 10): On your tray, next to your clock, right-click on Docker, then click on Settings, there you'll find the shared rdives: Here you can share your drives with Docker. If you encounter a problem with your firewall, please refer this to post.

  • On Docker Toolbox: Docker Toolbox uses Virtualbox to create a linux base on which Docker machine runs. Your Docker Container will be created inside Virtualbox. To share drives in virtualbox, go to Virtualbox->settings->shared folders->Machine Folders Here Map the drives you want to share with your Docker Container. If you want to keep these settings permanent (Recommended!), You should mark the make permanent checkbox or else these settings will be erased every time your virtualbox closes.

In a Docker Container with shared drives, not all files are shown on ls

This means your drives/folders are not shared properly. Docker uses caching, which may result in not all files and folders being listed on ls. In order to solve this problem, make your drive mapping settings permanent (see previous question).

Can't create/modify a file in Docker when using cwltool

When folders are shared with Docker Container, they inherit their current file access permissions. If you can write to a folder (with your current privileges) on your local machine, you should be able to write to that folder inside Docker Container also (provided same user initiated Docker). In all it is a file permission issue.

Workflows with Javascript Expressions occasionally give Timeout errors

To evaluate Javascript Expressions, cwltool looks for Nodejs on your system. In case Nodejs isn't installed, JS expressions are executed in a Docker Container. In order to avoid waiting forever in case error occurs, cwltool times out js expression evaluation after a timeout period (by default 20 seconds). You can provide a custom timeout period using --eval-timeout argument. So if you face this error, the best option is to install Nodejs on your local system. If you can't then use the --eval-timeout argument and set a higher timeout value.

If you still have problems with setting up and using Docker on Windows, please consult the online Docker Community. If the problem is specific to cwltool, create an issue on cwltool.