|
| 1 | +# Windows Compatibility |
| 2 | +cwltool is compatible with Windows. This means that you can create and run CWL |
| 3 | +workflows on Windows. On Windows, all workflows and tools are executed in |
| 4 | +[Docker Containers](https://docs.docker.com/docker-for-windows/). The default |
| 5 | +Docker Container is |
| 6 | +[Alpine with Bash support](https://github.com/frol/docker-alpine-bash). You can |
| 7 | +specify other Docker Containers for your tools and workflows using hints, |
| 8 | +[requirements](http://www.commonwl.org/v1.0/CommandLineTool.html#DockerRequirement)), |
| 9 | +or the `--default-container` cwltool option. |
| 10 | + |
| 11 | +## Supported Windows versions |
| 12 | +* Windows 10 with native [Docker for Windows](https://docs.docker.com/docker-for-windows/). |
| 13 | +* Windows 8.1 with [Docker ToolBox](https://docs.docker.com/toolbox/toolbox_install_windows/). |
| 14 | +* Windows 7 & 8 with Docker ToolBox may work (Not tested, please let us know!). |
| 15 | + |
| 16 | +## Installation |
| 17 | + |
| 18 | +You can install cwltool using pip or directly from source code. |
| 19 | + |
| 20 | +### Requirements |
| 21 | + |
| 22 | +Before installing cwltool, please install: |
| 23 | + |
| 24 | +* [Python 2 or 3](https://www.python.org/downloads/windows/) |
| 25 | +* [Docker](https://docs.docker.com/docker-for-windows/install/) |
| 26 | +* [Node.js](https://nodejs.org/en/download/) (optional, please install if your |
| 27 | + workflows or tools contain [Javascript Expressions](http://www.commonwl.org/v1.0/CommandLineTool.html#InlineJavascriptRequirement)) |
| 28 | + |
| 29 | +### Install using pip |
| 30 | + |
| 31 | +``` |
| 32 | +pip install cwltool |
| 33 | +``` |
| 34 | + |
| 35 | +### Install from source |
| 36 | + |
| 37 | +``` |
| 38 | +git clone https://github.com/common-workflow-language/cwltool.git |
| 39 | +cd cwltool |
| 40 | +python setup.py develop |
| 41 | +``` |
| 42 | + |
| 43 | +***Note:*** In order to test if cwltool has been successfully installed on your |
| 44 | +Windows system, run `cwltool` in `cmd`. If you see help instructions, cwltool was successfully installed. |
| 45 | + |
| 46 | +``` |
| 47 | + CWL document required, no input file was provided |
| 48 | + usage: cwltool [-h] [--basedir BASEDIR] [--outdir OUTDIR] [--no-container] |
| 49 | + [--preserve-environment ENVVAR] [--preserve-entire-environment] |
| 50 | + [--rm-container | --leave-container] |
| 51 | + [--tmpdir-prefix TMPDIR_PREFIX] |
| 52 | + ....................... |
| 53 | +``` |
| 54 | + |
| 55 | +## Running tests |
| 56 | + |
| 57 | +There are two types of tests available for cwltool: unit tests and conformance tests. |
| 58 | + |
| 59 | +### Unit tests |
| 60 | + |
| 61 | +To run cwltool's unit tests, go to the cwltool repository on your system and run: |
| 62 | + |
| 63 | +``` |
| 64 | +python setup.py test |
| 65 | +``` |
| 66 | + |
| 67 | +### Conformance tests |
| 68 | + |
| 69 | +To run the conformance tests, follow these instructions: |
| 70 | + |
| 71 | +``` |
| 72 | +pip install cwltest |
| 73 | +git clone https://github.com/common-workflow-language/common-workflow-language.git |
| 74 | +cd common-workflow-language/v1.0 |
| 75 | +cwltest --test conformance_test_v1.0.yaml -j 4 --tool cwltool |
| 76 | +``` |
| 77 | +The `-j` options is used to run multiple tests in parallel. |
| 78 | + |
| 79 | +## Troubleshooting |
| 80 | + |
| 81 | +You may encounter some problems with Docker on Windows. |
| 82 | + |
| 83 | +### Docker doesn't work on Windows, even outside cwltool |
| 84 | + |
| 85 | +Make sure you followed all instructions carefully while installing Docker. |
| 86 | +Please check the Environment variables. If the problem persists, we recommend |
| 87 | +consulting the [online Docker Community](https://forums.docker.com/). |
| 88 | + |
| 89 | +### Your local drives are not being shared with Docker Containers |
| 90 | + |
| 91 | +* ***On native Docker for Windows (supported by Windows 10):*** |
| 92 | +On your tray, next to your clock, right-click on Docker, then click on Settings, |
| 93 | +there you'll find the shared rdives: Here you can share your drives with Docker. |
| 94 | +If you encounter a problem with your firewall, please |
| 95 | +[refer this to post](https://blog.olandese.nl/2017/05/03/solve-docker-for-windows-error-a-firewall-is-blocking-file-sharing-between-windows-and-the-containers/). |
| 96 | + |
| 97 | +* ***On Docker Toolbox:*** |
| 98 | +Docker Toolbox uses Virtualbox to create a linux base on which Docker machine runs. |
| 99 | +Your Docker Container will be created inside Virtualbox. To share drives |
| 100 | +in virtualbox, go to ****Virtualbox->settings->shared folders->Machine Folders**** |
| 101 | +Here Map the drives you want to share with your Docker Container. |
| 102 | +If you want to keep these settings permanent (Recommended!), You should mark the |
| 103 | +`make permanent` checkbox or else these settings will be erased every time your |
| 104 | +virtualbox closes. |
| 105 | + |
| 106 | +### In a Docker Container with shared drives, not all files are shown on `ls` |
| 107 | + |
| 108 | +This means your drives/folders are not shared properly. Docker uses caching, |
| 109 | +which may result in not all files and folders being listed on ls. In order to |
| 110 | +solve this problem, make your drive mapping settings permanent (see previous |
| 111 | +question). |
| 112 | + |
| 113 | +### Can't create/modify a file in Docker when using cwltool |
| 114 | + |
| 115 | +When folders are shared with Docker Container, they inherit their current file |
| 116 | +access permissions. If you can write to a folder (with your current privileges) |
| 117 | +on your local machine, you should be able to write to that folder inside Docker |
| 118 | +Container also (provided same user initiated Docker). In all it is a file |
| 119 | +permission issue. |
| 120 | + |
| 121 | +### Workflows with Javascript Expressions occasionally give Timeout errors |
| 122 | +To evaluate Javascript Expressions, cwltool looks for Nodejs on your system. |
| 123 | +In case Nodejs isn't installed, JS expressions are executed in a Docker Container. |
| 124 | +In order to avoid waiting forever in case error occurs, cwltool times out js |
| 125 | +expression evaluation after a timeout period (by default 20 seconds). You can |
| 126 | +provide a custom timeout period using `--eval-timeout` argument. So if you face |
| 127 | +this error, the best option is to install Nodejs on your local system. If you |
| 128 | +can't then use the `--eval-timeout` argument and set a higher timeout value. |
| 129 | + |
| 130 | +*If you still have problems with setting up and using Docker on Windows, please |
| 131 | +consult the online Docker Community. If the problem is specific to cwltool, |
| 132 | +create an [issue on cwltool](https://github.com/common-workflow-language/cwltool/issues).* |
0 commit comments