Skip to content

Commit

Permalink
clarified docker docs
Browse files Browse the repository at this point in the history
  • Loading branch information
karasikov committed Jan 11, 2022
1 parent fe6582a commit ff68ff9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,24 @@ conda install -c bioconda -c conda-forge metagraph
If docker is available on the system, immediately get started with

```
docker run -v ${HOME}:/mnt ghcr.io/ratschlab/metagraph:master build -v -k 10 \
-o /mnt/transcripts_1000 \
/mnt/transcripts_1000.fa
docker pull ghcr.io/ratschlab/metagraph:master
docker run -v ${HOME}:/mnt ghcr.io/ratschlab/metagraph:master \
build -v -k 10 -o /mnt/transcripts_1000 /mnt/transcripts_1000.fa
```
and replace `${HOME}` with a directory on the host system to map it under `/mnt` in the container.

(Replace `${HOME}` with a directory on the host system to map it under `/mnt` in the container.)
To run the binary compiled for the `Protein` alphabet, just add `--entrypoint metagraph_Protein`:
```
docker run -v ${HOME}:/mnt --entrypoint metagraph_Protein ghcr.io/ratschlab/metagraph:master \
build -v -k 10 -o /mnt/graph /mnt/protein.fa
```

As you see, running MetaGraph from docker containers is very easy. Also, the following command (or similar) may be handy to see what directory is mounted in the container or other sort of debugging of the command:
```
docker run -v ${HOME}:/mnt --entrypoint ls ghcr.io/ratschlab/metagraph:master /mnt
```

All different versions of the container are listed [here](https://github.com/ratschlab/metagraph/pkgs/container/metagraph).
All different versions of the container image are listed [here](https://github.com/ratschlab/metagraph/pkgs/container/metagraph).

### Install From Sources

Expand Down
19 changes: 16 additions & 3 deletions metagraph/docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,28 @@ Docker container

If docker is available on your system, you can immediately get started with::

docker run -v ${DATA_DIR_HOST}:/mnt ghcr.io/ratschlab/metagraph:latest \
docker run -v ${DATA_DIR_HOST}:/mnt ghcr.io/ratschlab/metagraph:master \
build -v -k 10 -o /mnt/transcripts_1000 /mnt/transcripts_1000.fa


where you'd need to replace ``${DATA_DIR_HOST}`` with a directory on the host system to map it
where ``${DATA_DIR_HOST}`` should be replaced with a directory on the host system to map it
under ``/mnt`` in the container. This docker container uses the latest version of MetaGraph from
the source `GitHub repository <https://github.com/ratschlab/metagraph>`_ (branch ``master``).
See also the `image overview <https://github.com/ratschlab/metagraph/pkgs/container/metagraph>`_ for
other versions of the metagraph image.
other versions of the image.

By default, it executes the binary compiled for the DNA alphabet.
To run the binary compiled for the `Protein` alphabet, just add ``--entrypoint metagraph_Protein``::

docker run --entrypoint metagraph_Protein \
-v ${DATA_DIR_HOST}:/mnt ghcr.io/ratschlab/metagraph:master \
build -v -k 10 -o /mnt/graph /mnt/protein.fa

As you see, running MetaGraph from docker containers is very easy.
Also, the following command (or similar) may be handy to see what directory is mounted in the
container or other sort of debugging of the command::

docker run -v ${DATA_DIR_HOST}:/mnt --entrypoint ls ghcr.io/ratschlab/metagraph:master /mnt


Install from source
Expand Down

0 comments on commit ff68ff9

Please sign in to comment.