Skip to content

Commit 795527d

Browse files
authored
Merge pull request #6 from jvdzwaan/windowsdoc
Better positioning of content. simplifying instructions
2 parents 57b6fae + 81c1e34 commit 795527d

File tree

1 file changed

+94
-76
lines changed

1 file changed

+94
-76
lines changed

windowsdoc.md

Lines changed: 94 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
1-
## **Windows Compatible Cwltool**
2-
Windows Compatible cwltool means that now you can create and run your workflows
3-
using cwltool on Windows under a [Docker Container](https://docs.docker.com/docker-for-windows/).
4-
On Windows, all tools and workflows will be executed inside a linux based Docker
5-
Container. If a Docker Container is not explicitly provided (using [Docker Requirement](http://www.commonwl.org/v1.0/CommandLineTool.html#DockerRequirement))
6-
by user, then a minimal, posix compliant Alpine Docker image which has Bash pre
7-
installed as fallback (Default) [Docker Container](https://github.com/frol/docker-alpine-bash).
8-
You can also provide your own default Docker Container using the `--default-container` argument.
9-
10-
### ***Windows Versions Supported***:
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
1112
* Windows 10 with native [Docker for Windows](https://docs.docker.com/docker-for-windows/).
1213
* Windows 8.1 with [Docker ToolBox](https://docs.docker.com/toolbox/toolbox_install_windows/).
1314
* Windows 7 & 8 with Docker ToolBox may work (Not tested, please let us know!).
1415

15-
### ***Requirements***:
16-
* [Python 2 or 3](https://www.python.org/downloads/windows/).
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/)
1725
* [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))
1828

19-
### ***Best Practises***:
20-
You should install [Node.js](https://nodejs.org/en/download/) on your system if
21-
your workflow contains [Javascript Expressions](http://www.commonwl.org/v1.0/CommandLineTool.html#InlineJavascriptRequirement).
29+
### Install using pip
2230

23-
### ***Installation***:
24-
**Using Pip**:
25-
You can install cwltool on Windows using pip
2631
```
27-
pip install cwltool
32+
pip install cwltool
2833
```
2934

30-
**Installing from source**:
31-
Instead of pip install, you can also install cwltool from source code.
35+
### Install from source
36+
3237
```
33-
git clone https://github.com/common-workflow-language/cwltool.git
34-
cd cwltool
35-
python setup.py develop
38+
git clone https://github.com/common-workflow-language/cwltool.git
39+
cd cwltool
40+
python setup.py develop
3641
```
37-
***Note:*** In order to test if cwltool has been successfully installed on your
38-
Windows system, run `cwltool` on your `cmd`. A screen showing help instructions
39-
like shown below should be there.
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+
4046
```
4147
CWL document required, no input file was provided
4248
usage: cwltool [-h] [--basedir BASEDIR] [--outdir OUTDIR] [--no-container]
@@ -46,69 +52,81 @@ like shown below should be there.
4652
.......................
4753
```
4854

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:
4962

50-
### ***Running Cwltool's Unit Tests***
51-
If you want to run cwltool's unit test, go to cwltool's repository on your system and run
5263
```
53-
python setup.py test
64+
python setup.py test
5465
```
5566

56-
### ***Running Conformance tests using cwltool***
57-
```pip install cwltest
58-
git clone https://github.com/common-workflow-language/common-workflow-language.git
59-
cd common-workflow-language/v1.0
60-
cwltest --test conformance_test_v1.0.yaml -j 4 --tool cwltool
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
6176
```
62-
Here `-j` arg is used to run multiple tests in parallel.
77+
The `-j` options is used to run multiple tests in parallel.
6378

64-
 
65-
 
79+
## Troubleshooting
6680

67-
> #### Installing cwltool on Windows is smooth but you may face some problems in setting up Docker. Some of the common issues and their solution are mentioned below.
81+
You may encounter some problems with Docker on Windows.
6882

69-
 
83+
### Docker doesn't work on Windows, even outside cwltool
7084

71-
**Docker doesn't work on Windows, even outside cwltool.**
72-
Make sure you followed all instructions carefully while installing Docker. Please
73-
check the Environment variables. If the problem persists, we recommend consulting
74-
the [online Docker Community](https://forums.docker.com/).
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/).
7588

76-
**Your local drives are not being shared with Docker Container.**
77-
* **On native Docker for Windows (supported by Windows 10):**
78-
On your tray, next to your clock, right-click on Docker, then click on Settings,
79-
there you'll find the shared rives: Here you can share your drives with Docker.
80-
If you encounter a problem with your firewall, please [refer this post](https://blog.olandese.nl/2017/05/03/solve-docker-for-windows-error-a-firewall-is-blocking-file-sharing-between-windows-and-the-containers/).
89+
### Your local drives are not being shared with Docker Containers
8190

82-
* **On Docker Toolbox:**
83-
Docker Toolbox uses Virtualbox to create a linux base on which Docker machine runs.
84-
Your Docker Container will be created inside Virtualbox. To share drives
85-
in virtualbox, go to **Virtualbox->settings->shared folders->Machine Folders**.
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****
86101
Here Map the drives you want to share with your Docker Container.
87-
If you want to keep these settings permanent (Recommended!), You should mark the
88-
`make permanent` checkbox or else these settings will be erased every time your
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
89104
virtualbox closes.
90105

91-
**In a Docker Container with shared drives, not all files are shown on `ls`.**
92-
This means your drives/folders are not shared properly. Docker uses caching,
93-
which may result in not all files and folders being listed on ls.
94-
In order to solve this problem, make your drive mapping settings permanent (see previous question).
106+
### In a Docker Container with shared drives, not all files are shown on `ls`
95107

96-
**Can't create/modify a file in Docker when using cwltool.**
97-
When folders are shared with Docker Container, they inherit their current file
98-
access permissions. If you can write to a folder (with your current privileges)
99-
on your local machine, you should be able to write to that folder inside Docker
100-
Container also (provided same user initiated Docker). In all it is a file permission issue.
101-
So to solve this issue, make sure that on your local system, you have write access for the folders
102-
in which Docker is trying to create/write file.
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).
103112

104-
**Workflows with Javascript Expressions occasionally give Timeout errors.**
105-
To evaluate Javascript Expressions, cwltool looks for Nodejs on your system.
106-
In case Nodejs isn't installed, JS expressions are executed in a Docker Container.
107-
In order to avoid waiting forever in case error occurs, cwltool times out js
108-
expression evaluation after a timeout period (by default 20 seconds). You can
109-
provide a custom timeout period using `--eval-timeout` argument.
110-
So if you face this error, the best option is to install Nodejs on your local
111-
system. If you can't then use the `--eval-timeout` argument and set a higher timeout value.
112-
113-
> #### If you still face some issues 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](https://github.com/common-workflow-language/cwltool/issues).
113+
### Can't create/modify a file in Docker when using cwltool
114114

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

Comments
 (0)