Skip to content

Commit

Permalink
Support for Docker and Singularity (#24)
Browse files Browse the repository at this point in the history
* Support for Docker and Singularity

* Rephrasing of certain sentences for a better clarity of meaning.
  • Loading branch information
DimitriosBellos authored Feb 7, 2022
1 parent e912ddf commit d939912
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**/__pycache__
**/.classpath
**/.dockerignore
**/.env
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/bin
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
README.md
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM nvidia/cuda:11.3.1-devel-ubuntu20.04

WORKDIR /app
COPY . .

RUN apt update
RUN apt install -y git
RUN apt install -y libfftw3-dev
RUN apt install -y g++
RUN apt install -y python3
RUN apt install -y python3-pip
RUN export CXX=$(which g++)
RUN export CUDACXX=$(which nvcc)
RUN git submodule update --init --recursive
RUN pip install .

36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,42 @@ To run the tests, follow the installation instructions for developers and then d
pytest
```

## Docker

Parakeet can also be installed and used via Docker (https://www.docker.com/get-started). To download parakeet's docker container you can do the following:

```sh
docker pull quay.io/rosalindfranklininstitute/parakeet:master
```

To use parakeet with docker with GPU support the host machine should have the approprate Nvidia drivers installed.

To easily input and output data from the container the volume mechanism can be used, where a workspace directory of the host machine is mounted to a directory in the container (in the folder /mnt in the example below). For this reason it is advised that all the relevent files (e.g. config.yaml, sample.h5, etc.) should be present in the host workspace directory.

Below is an example on how to use parakeet with docker to simulate the exit wave:

```sh
docker run --gpus all -v <host_workspace>:/mnt --rm -i -t parakeet:master parakeet.simulate.exit_wave -c /mnt/config.yaml -d gpu -s /mnt/sample.h5 -e /mnt/exit_wave.h5
```

## Singularity

Parakeet can also be installed and used via Singularity (https://sylabs.io/guides/2.6/user-guide/installation.html). To download parakeet's singularity container you can do the following:

```sh
singularity pull library://rosalindfranklininstitute/parakeet/parakeet:master
```

Again similar to docker, to use parakeet with singularity and GPU support, the host machine should have the approprate Nvidia drivers installed.

To easily input and output data from the container, a workspace directory in the host machine, where all the relevent files (e.g. config.yaml, sample.h5, etc.) should be present, can be binded to a directory in the container.

Below is an example on how to use parakeet with singularity to simulate the exit wave:

```sh
singularity run --nv --bind <host_workspace>:/mnt parakeet.sif parakeet.simulate.exit_wave -c /mnt/config_new.yaml -d gpu -s /mnt/sample.h5 -e /mnt/exit_wave.h5
```

## Usage

Simulation of datasets is split into a number of different commands. Each
Expand Down

0 comments on commit d939912

Please sign in to comment.