Skip to content

Commit dd99739

Browse files
authored
Update installation instructions
1 parent 5bdb3d3 commit dd99739

File tree

1 file changed

+46
-26
lines changed

1 file changed

+46
-26
lines changed

README.rst

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ intended to be feature complete and provide comprehensive validation of CWL
2121
files as well as provide other tools related to working with CWL.
2222

2323
This is written and tested for
24-
`Python <https://www.python.org/>`_ ``3.x {x = 6, 7, 8}``
24+
`Python <https://www.python.org/>`_ ``3.x {x = 6, 7, 8, 9}``
2525

2626
The reference implementation consists of two packages. The ``cwltool`` package
2727
is the primary Python module containing the reference implementation in the
@@ -31,61 +31,81 @@ The ``cwlref-runner`` package is optional and provides an additional entry point
3131
under the alias ``cwl-runner``, which is the implementation-agnostic name for the
3232
default CWL interpreter installed on a host.
3333

34-
``cwltool`` is provided by the CWL project, `a member project of Software Freedom Conservancy <https://sfconservancy.org/news/2018/apr/11/cwl-new-member-project/>`_ and our `many contributors <https://github.com/common-workflow-language/cwltool/graphs/contributors>`_.
34+
``cwltool`` is provided by the CWL project, `a member project of Software Freedom Conservancy <https://sfconservancy.org/news/2018/apr/11/cwl-new-member-project/>`_
35+
and our `many contributors <https://github.com/common-workflow-language/cwltool/graphs/contributors>`_.
3536

3637
Install
3738
-------
3839

39-
Your operating system may offer cwltool directly. For `Debian <https://tracker.debian.org/pkg/cwltool>`_ or `Ubuntu <https://launchpad.net/ubuntu/+source/cwltool>`_ try
40+
``cwltool`` packages
41+
^^^^^^^^^^^^^^^^^^^^
42+
43+
Your operating system may offer cwltool directly. For `Debian <https://tracker.debian.org/pkg/cwltool>`_, `Ubuntu <https://launchpad.net/ubuntu/+source/cwltool>`_,
44+
and similar Linux distribution try
4045

4146
.. code:: bash
4247
43-
apt-get install cwltool
48+
sudo apt-get install cwltool
4449
45-
For MacOS X, other UNIXes or Windows packages prepared by the conda-forge project. Please follow instructions of conda-forge (https://conda-forge.org/#about) for its installation, then perform:
50+
If you are running MacOS X or other UNIXes and you want to use packages prepared by the conda-forge project, then
51+
please follow the install instructions for `conda-forge <https://conda-forge.org/#about>`_ (if you haven't already) and then
4652

4753
.. code:: bash
4854
4955
conda install -c conda-forge cwltool
50-
51-
Under the hood, conda setups virtual environments before installing `cwltool` to
52-
avoid conflicting versions of the same library. When installing cwltool directly,
53-
it is recommended to do the same manually:
56+
57+
All of the above methods of installing ``cwltool`` use packages which might contain bugs already fixed in newer versions, or be missing features that you desire.
58+
If the packaged version of ``cwltool`` available to you is too old, then we recommend installing using ``pip`` and ``venv`::
5459

5560
.. code:: bash
5661
57-
virtualenv -p python3 venv # Create a virtual environment
58-
source venv/bin/activate # Activate environment before installing `cwltool`
62+
python3 -m venv env # Create a virtual environment named 'env' in the current directory
63+
source env/bin/activate # Activate environment before installing `cwltool`
5964
60-
Installing the official package from PyPi (will install "cwltool" package as
65+
Then install the latest ``cwlref-runner`` package from PyPi (which will install the latest ``cwltool`` package as
6166
well)
6267

6368
.. code:: bash
6469
6570
pip install cwlref-runner
6671
67-
If installing alongside another CWL implementation then
72+
If installing alongside another CWL implementation (like ``toil-cwl-runner`` or ``arvados-cwl-runner``) then instead run
6873

6974
.. code:: bash
7075
7176
pip install cwltool
7277
73-
Or you can install from source:
78+
MS Windows users
79+
^^^^^^^^^^^^^^^^
80+
81+
1. Install `"Windows Subsystem for Linux 2" (WSL2) and Docker Desktop <https://docs.docker.com/docker-for-windows/wsl/#prerequisites>`_
82+
2. Install `Debian from the Microsoft Store <https://www.microsoft.com/en-us/p/debian/9msvkqc78pk6>`_
83+
3. Set Debian as your default WSL 2 distro: ``wsl --set-default debian``
84+
4. Reboot if you have not yet already.
85+
5. Launch Debian and follow the Linux instructions above (``apt-get install cwltool`` or use the ``venv`` method)
86+
87+
``cwltool`` development version
88+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89+
90+
Or you can skip the direct ``pip`` commands above and install the latest development version of ``cwltool``:
7491

7592
.. code:: bash
7693
77-
git clone https://github.com/common-workflow-language/cwltool.git # clone cwltool repo
78-
cd cwltool # Switch to source directory
79-
pip install . # Install `cwltool` from source
94+
git clone https://github.com/common-workflow-language/cwltool.git # clone (copy) the cwltool git repository
95+
cd cwltool # Change to source directory that git clone just downloaded
96+
pip install . # Installs ``cwltool`` from source
8097
cwltool --version # Check if the installation works correctly
8198
8299
Remember, if co-installing multiple CWL implementations then you need to
83100
maintain which implementation ``cwl-runner`` points to via a symbolic file
84101
system link or `another facility <https://wiki.debian.org/DebianAlternatives>`_.
85102

103+
Recommended Software
104+
^^^^^^^^^^^^^^^^^^^^
105+
86106
You may also want to have the following installed:
87-
node.js
88-
Docker, udocker, or Singularity (optional)
107+
- `node.js <https://nodejs.org/en/download/>`_
108+
- Docker, udocker, or Singularity (optional)
89109

90110
Without these, some examples in the CWL tutorials at http://www.commonwl.org/user_guide/ may not work.
91111

@@ -97,7 +117,7 @@ Simple command::
97117
cwl-runner [tool-or-workflow-description] [input-job-settings]
98118

99119
Or if you have multiple CWL implementations installed and you want to override
100-
the default cwl-runner use::
120+
the default cwl-runner then use::
101121

102122
cwltool [tool-or-workflow-description] [input-job-settings]
103123

@@ -106,8 +126,8 @@ these will be inserted at the beginning of the command line::
106126

107127
export CWLTOOL_OPTIONS="--debug"
108128

109-
Use with boot2docker
110-
--------------------
129+
Use with boot2docker on macOS
130+
-----------------------------
111131
boot2docker runs Docker inside a virtual machine and it only mounts ``Users``
112132
on it. The default behavior of CWL is to create temporary directories under e.g.
113133
``/Var`` which is not accessible to Docker containers.
@@ -117,8 +137,8 @@ and ``--tmp-outdir-prefix`` to somewhere under ``/Users``::
117137

118138
$ cwl-runner --tmp-outdir-prefix=/Users/username/project --tmpdir-prefix=/Users/username/project wc-tool.cwl wc-job.json
119139

120-
Using user-space replacements for Docker
121-
----------------------------------------
140+
Using uDocker
141+
-------------
122142

123143
Some shared computing environments don't support Docker software containers for technical or policy reasons.
124144
As a work around, the CWL reference runner supports using alternative ``docker`` implementations on Linux
@@ -134,7 +154,7 @@ Run `cwltool` just as you normally would, but with the new option, e.g. from the
134154
135155
cwltool --user-space-docker-cmd=udocker https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/main/v1.0/v1.0/test-cwl-out2.cwl https://github.com/common-workflow-language/common-workflow-language/blob/main/v1.0/v1.0/empty.json
136156
137-
``cwltool`` can use `Singularity <http://singularity.lbl.gov/>`_ version 2.6.1
157+
``cwltool`` can also use `Singularity <https://github.com/hpcng/singularity/releases/>`_ version 2.6.1
138158
or later as a Docker container runtime.
139159
``cwltool`` with Singularity will run software containers specified in
140160
``DockerRequirement`` and therefore works with Docker images only, native
@@ -143,7 +163,7 @@ runtime, provide ``--singularity`` command line option to ``cwltool``.
143163
With Singularity, ``cwltool`` can pass all CWL v1.0 conformance tests, except
144164
those involving Docker container ENTRYPOINTs.
145165

146-
166+
Example:
147167
.. code:: bash
148168
149169
cwltool --singularity https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/main/v1.0/v1.0/v1.0/cat3-tool-mediumcut.cwl https://github.com/common-workflow-language/common-workflow-language/blob/main/v1.0/v1.0/cat-job.json

0 commit comments

Comments
 (0)