Skip to content

Commit

Permalink
Merge branch 'main' of github.com:bioexcel/biobb_workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gbayarri committed Jun 6, 2024
2 parents e2c5c56 + 19fae82 commit 18cd0dc
Show file tree
Hide file tree
Showing 14 changed files with 1,260 additions and 294 deletions.
111 changes: 90 additions & 21 deletions biobb_wf_amber_abc_setup/docker/README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,116 @@
# <a name="execute-wf"></a>Execute workflow through docker container

To execute the workflow through a docker container, please follow the next steps:
All the **BioBB workflows** can be executed via **docker container**. Inside this container there are all the necessary **dependencies** for executing the workflow. These workflows are available via [**docker hub**](https://hub.docker.com/), though in this repository you can find as well all the necessary files for **building** them **in house**.

## <a name="requirements"></a>Requirements

For executing this **BioBB workflow**, there is a single requirement: to have [**Docker**](https://docs.docker.com/engine/install/) installed in your computer. Once this requirement is fullfilled, you will be able to install the workflow.

## <a name="download"></a>Download and execute container from docker hub

Below there are the steps to follow for downloading and running the container from [**docker hub**](https://hub.docker.com/r/biobb/biobb_wf_amber).

In the following link you can find all the BioBB workflows available in docker hub:

<https://hub.docker.com/u/biobb>

### <a name="pull"></a>Download container

For **downloading** the container to you computer, please type the following instruction in your **terminal**:

docker pull biobb/biobb_wf_amber_abc_setup

### <a name="run-wf-d"></a>Run workflow

The **BioBB workflows containers** can be executed either **interactively** via **Jupyter Notebook** or **sequentially** in **python**.

#### <a name="run-jn-d"></a>Run in Jupyter Notebook

For **running** the container in Jupyter Notebook, please type the following instruction in your **terminal**:

docker run --name <container_name> -d -e MODE=jupyter -p <port>:8888 -v /path/to/inputs:/data biobb/biobb_wf_amber_abc_setup

Where:
* **container_name** is the name of the container (optional).
* **port** is the port of your computer where the output of the container will be redirected (ie 3000).
* **/path/to/inputs** is the path to the folder where the **input(s)** and **workflow.yml** files are located (all of them must be in the same folder).

This instruction will run the container in **detached** (or background) mode, so once it's running, you should go to your **browser** and type:

<http://localhost:3000/notebooks/notebook.ipynb>

## <a name="files"></a>Workflow files
Note that **the port can change** depending on the value provided in the previous step.

Below you can find the list of all the needed **files** for executing this workflow:
#### <a name="run-py-d"></a>Run in Python

Below you can find the list of all the needed **files** for executing this workflow in **python**:

* **Dockerfile:** the file used for building a docker container with this workflow inside.
* **workflow.yml:** the configuration file with the I/O dependencies and settings for each step of the workflow.
* **inputs:** the inputs vary depending on the workflow, all the needed files are available in this same repository, just be sure to have them in the same folder where **workflow.yml** is.

## <a name="requirements"></a>Requirements
For **running** the container in python, please type the following instruction in your **terminal**:

docker run -w /data -v /path/to/inputs:/data biobb/biobb_wf_amber_abc_setup

For executing this BioBB workflow, there is a single requirement: to have [Docker](https://docs.docker.com/engine/install/) installed in your computer. Once this requirement is fullfilled, you will be able to install the workflow.
Where **/path/to/inputs** is the path to the folder where the **input(s)** and **workflow.yml** files are located (all of them must be in the same folder).

## <a name="installation"></a>Installation
## <a name="build"></a>Build container in house

To execute the workflow through a docker container, please follow the next steps:

After downloading the workflow files and decompressing them in a folder, please go to this directory, open it in terminal and execute the following script:
### <a name="installation"></a>Installation

docker build -t <container_image> .
First off, the [**Dockerfile**](Dockerfile) file found in this repository must be in the same folder where the building instruction is performed.

Please go to the folder where the [**Dockerfile**](Dockerfile) file is, open it in terminal and execute the following script:

docker build --build-arg REPO=biobb_wf_amber --build-arg SUBREPO=abc_setup -t <container_image> .

Where **container_image** will be the name of the docker container image.

Note: if using an **ARM** architecture such as the **Apple Silicon chips**, please be sure of adding the **--platform** flag:

docker build --platform linux/amd64 -t <container_image> .
docker build --build-arg REPO=biobb_wf_amber --build-arg SUBREPO=abc_setup --platform linux/amd64 -t <container_image> .

### <a name="run-wf-b"></a>Run workflow

The **BioBB workflows containers** can be executed either **interactively** via **Jupyter Notebook** or **sequentially** in **python**.

For adding image tags:
#### <a name="run-jn-b"></a>Run in Jupyter Notebook

docker build --platform linux/amd64 -t <container_image>:<tag> .
docker tag <container_image>:<tag> <container_image>:latest
docker push <container_image>:<tag>
docker push <container_image>:latest
For **running** the container in Jipyter Notebook, please type the following instruction in your **terminal**:

## <a name="run-wf"></a>Run workflow
docker run --name <container_name> -d -e MODE=jupyter -p <port>:8888 -v /path/to/inputs:/data <container_image>

After that, the only thing left is to run the workflow:
Where:
* **container_name** is the name of the container (optional).
* **port** is the port of your computer where the output of the container will be redirected (ie 3000).
* **/path/to/inputs** is the path to the folder where the **input(s)** and **workflow.yml** files are located (all of them must be in the same folder).
* **container_image** is the name of the docker container image.

This instruction will run the container in **detached** (or background) mode, so once it's running, you should go to your **browser** and type:

http://localhost:3000/notebooks/notebook.ipynb

Note that **the port can change** depending on the value provided in the previous step.

#### <a name="run-py-b"></a>Run in Python

Below you can find the list of all the needed **files** for executing this workflow in **python**:

* **workflow.yml:** the configuration file with the I/O dependencies and settings for each step of the workflow.
* **inputs:** the inputs vary depending on the workflow, all the needed files are available in this same repository, just be sure to have them in the same folder where **workflow.yml** is.

For **running** the container in python, please type the following instruction in your **terminal**:

docker run -w /data -v /path/to/inputs:/data <container_image>

Where **/path/to/inputs** is the path to the folder where the input(s) and workflow.yml files are located (all of them must be in the same folder); and **container_image** is the name of the docker container image
Where **/path/to/inputs** is the path to the folder where the **input(s)** and **workflow.yml** files are located (all of them must be in the same folder); and **container_image** is the name of the docker container image.

## <a name="time"></a>Time of execution

Take into account that depending on the number of steps, the tools executed and the settings provided, along with the power of your computer, the execution of the workflow can take from a **few minutes** to **several hours**. The workflow progress will be shown in your terminal.
Take into account that depending on the number of steps, the tools executed and the settings provided, along with the power of your computer, the execution of the workflow can take from a **few minutes** to **several hours**. The workflow progress will be shown in your terminal if you execute the workflow via python.

## <a name="get-output"></a>Get output results
## <a name="output"></a>Get output results

Once the workflow is finished, you just should enter the new **wf_name_of_workflow** folder and, inside it, you will find a folder for each step of the workflow with all the files generated in every step.
Once the workflow is finished, you just should enter the new **biobb_wf_amber_abc_setup** folder and, inside it, you will find a folder for each step of the workflow with all the files generated in every step.
111 changes: 90 additions & 21 deletions biobb_wf_amber_md_setup/docker/README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,116 @@
# <a name="execute-wf"></a>Execute workflow through docker container

To execute the workflow through a docker container, please follow the next steps:
All the **BioBB workflows** can be executed via **docker container**. Inside this container there are all the necessary **dependencies** for executing the workflow. These workflows are available via [**docker hub**](https://hub.docker.com/), though in this repository you can find as well all the necessary files for **building** them **in house**.

## <a name="requirements"></a>Requirements

For executing this **BioBB workflow**, there is a single requirement: to have [**Docker**](https://docs.docker.com/engine/install/) installed in your computer. Once this requirement is fullfilled, you will be able to install the workflow.

## <a name="download"></a>Download and execute container from docker hub

Below there are the steps to follow for downloading and running the container from [**docker hub**](https://hub.docker.com/r/biobb/biobb_wf_amber).

In the following link you can find all the BioBB workflows available in docker hub:

<https://hub.docker.com/u/biobb>

### <a name="pull"></a>Download container

For **downloading** the container to you computer, please type the following instruction in your **terminal**:

docker pull biobb/biobb_wf_amber_md_setup

### <a name="run-wf-d"></a>Run workflow

The **BioBB workflows containers** can be executed either **interactively** via **Jupyter Notebook** or **sequentially** in **python**.

#### <a name="run-jn-d"></a>Run in Jupyter Notebook

For **running** the container in Jupyter Notebook, please type the following instruction in your **terminal**:

docker run --name <container_name> -d -e MODE=jupyter -p <port>:8888 -v /path/to/inputs:/data biobb/biobb_wf_amber_md_setup

Where:
* **container_name** is the name of the container (optional).
* **port** is the port of your computer where the output of the container will be redirected (ie 3000).
* **/path/to/inputs** is the path to the folder where the **input(s)** and **workflow.yml** files are located (all of them must be in the same folder).

This instruction will run the container in **detached** (or background) mode, so once it's running, you should go to your **browser** and type:

<http://localhost:3000/notebooks/notebook.ipynb>

## <a name="files"></a>Workflow files
Note that **the port can change** depending on the value provided in the previous step.

Below you can find the list of all the needed **files** for executing this workflow:
#### <a name="run-py-d"></a>Run in Python

Below you can find the list of all the needed **files** for executing this workflow in **python**:

* **Dockerfile:** the file used for building a docker container with this workflow inside.
* **workflow.yml:** the configuration file with the I/O dependencies and settings for each step of the workflow.
* **inputs:** the inputs vary depending on the workflow, all the needed files are available in this same repository, just be sure to have them in the same folder where **workflow.yml** is.

## <a name="requirements"></a>Requirements
For **running** the container in python, please type the following instruction in your **terminal**:

docker run -w /data -v /path/to/inputs:/data biobb/biobb_wf_amber_md_setup

For executing this BioBB workflow, there is a single requirement: to have [Docker](https://docs.docker.com/engine/install/) installed in your computer. Once this requirement is fullfilled, you will be able to install the workflow.
Where **/path/to/inputs** is the path to the folder where the **input(s)** and **workflow.yml** files are located (all of them must be in the same folder).

## <a name="installation"></a>Installation
## <a name="build"></a>Build container in house

To execute the workflow through a docker container, please follow the next steps:

After downloading the workflow files and decompressing them in a folder, please go to this directory, open it in terminal and execute the following script:
### <a name="installation"></a>Installation

docker build -t <container_image> .
First off, the [**Dockerfile**](Dockerfile) file found in this repository must be in the same folder where the building instruction is performed.

Please go to the folder where the [**Dockerfile**](Dockerfile) file is, open it in terminal and execute the following script:

docker build --build-arg REPO=biobb_wf_amber --build-arg SUBREPO=md_setup -t <container_image> .

Where **container_image** will be the name of the docker container image.

Note: if using an **ARM** architecture such as the **Apple Silicon chips**, please be sure of adding the **--platform** flag:

docker build --platform linux/amd64 -t <container_image> .
docker build --build-arg REPO=biobb_wf_amber --build-arg SUBREPO=md_setup --platform linux/amd64 -t <container_image> .

### <a name="run-wf-b"></a>Run workflow

The **BioBB workflows containers** can be executed either **interactively** via **Jupyter Notebook** or **sequentially** in **python**.

For adding image tags:
#### <a name="run-jn-b"></a>Run in Jupyter Notebook

docker build --platform linux/amd64 -t <container_image>:<tag> .
docker tag <container_image>:<tag> <container_image>:latest
docker push <container_image>:<tag>
docker push <container_image>:latest
For **running** the container in Jipyter Notebook, please type the following instruction in your **terminal**:

## <a name="run-wf"></a>Run workflow
docker run --name <container_name> -d -e MODE=jupyter -p <port>:8888 -v /path/to/inputs:/data <container_image>

After that, the only thing left is to run the workflow:
Where:
* **container_name** is the name of the container (optional).
* **port** is the port of your computer where the output of the container will be redirected (ie 3000).
* **/path/to/inputs** is the path to the folder where the **input(s)** and **workflow.yml** files are located (all of them must be in the same folder).
* **container_image** is the name of the docker container image.

This instruction will run the container in **detached** (or background) mode, so once it's running, you should go to your **browser** and type:

http://localhost:3000/notebooks/notebook.ipynb

Note that **the port can change** depending on the value provided in the previous step.

#### <a name="run-py-b"></a>Run in Python

Below you can find the list of all the needed **files** for executing this workflow in **python**:

* **workflow.yml:** the configuration file with the I/O dependencies and settings for each step of the workflow.
* **inputs:** the inputs vary depending on the workflow, all the needed files are available in this same repository, just be sure to have them in the same folder where **workflow.yml** is.

For **running** the container in python, please type the following instruction in your **terminal**:

docker run -w /data -v /path/to/inputs:/data <container_image>

Where **/path/to/inputs** is the path to the folder where the input(s) and workflow.yml files are located (all of them must be in the same folder); and **container_image** is the name of the docker container image
Where **/path/to/inputs** is the path to the folder where the **input(s)** and **workflow.yml** files are located (all of them must be in the same folder); and **container_image** is the name of the docker container image.

## <a name="time"></a>Time of execution

Take into account that depending on the number of steps, the tools executed and the settings provided, along with the power of your computer, the execution of the workflow can take from a **few minutes** to **several hours**. The workflow progress will be shown in your terminal.
Take into account that depending on the number of steps, the tools executed and the settings provided, along with the power of your computer, the execution of the workflow can take from a **few minutes** to **several hours**. The workflow progress will be shown in your terminal if you execute the workflow via python.

## <a name="get-output"></a>Get output results
## <a name="output"></a>Get output results

Once the workflow is finished, you just should enter the new **wf_name_of_workflow** folder and, inside it, you will find a folder for each step of the workflow with all the files generated in every step.
Once the workflow is finished, you just should enter the new **biobb_wf_amber_md_setup** folder and, inside it, you will find a folder for each step of the workflow with all the files generated in every step.
Loading

0 comments on commit 18cd0dc

Please sign in to comment.