From ff68ff96b5b033cc6de3e1abae1e29a394486f09 Mon Sep 17 00:00:00 2001 From: Mikhail Karasikov Date: Tue, 11 Jan 2022 14:08:32 +0100 Subject: [PATCH] clarified docker docs --- README.md | 20 +++++++++++++++----- metagraph/docs/source/installation.rst | 19 ++++++++++++++++--- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 92be0afaea..a5109b2257 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/metagraph/docs/source/installation.rst b/metagraph/docs/source/installation.rst index 1b24642e5e..ab967b82a1 100644 --- a/metagraph/docs/source/installation.rst +++ b/metagraph/docs/source/installation.rst @@ -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 `_ (branch ``master``). See also the `image overview `_ 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