This repository contains the standard Docker image for running analyses at GMEL.
To request additional software, please send a message to Josef ([email protected]).
- Git
- R
- lmutils
- data.table
- dplyr
- mgcv
- doParallel
- foreach
- MBESS
- corpcor
- Python 3.13.2
- numpy
- pandas
- matplotlib
- Rust
- lmutils
- PLINK
The image is available on the GitHub Container Registry. It can be included in a Dockerfile as follows:
FROM ghcr.io/gmelab/docker:latest
To install Docker on your local machine, follow the instructions on the Docker website.
If we only want to run a single analysis, simply want to experiment, or just don't want to deal with Docker, we can use the Docker image as an environment on DNAnexus then run commands directly on it.
To do so, we first want to download and save the Docker image as an asset on DNAnexus. We can do this using the following command:
docker pull ghcr.io/gmelab/docker
# This might take a few minutes, and won't display a progress bar
docker save ghcr.io/gmelab/docker | gzip | dx upload - --path docker-images/gmel-docker.tar.gz
Now, we can run commands inside our container!
dx upload - <<< 'print("Hello, World!")' --path analysis.R
dx run swiss-army-knife \
-iimage_file=docker-images/gmel-docker.tar.gz \
-iin="analysis.R" \
-icmd='Rscript analysis.R'
To run a reproducible analysis (i.e. something we may want to run dozens or hundreds of times), we want to extend the base Docker image with our analysis code and store it on DNAnexus.
To do so, we start by creating out Dockerfile.
FROM ghcr.io/gmelab/docker:latest
# This copies everything in the current directory to the container
# If we want to ignore certain files, we can create a .dockerignore file
COPY . .
Next, we want to build the Docker image. We can do this by running the following command in the directory with the Dockerfile:
docker build . -t my-analysis
Now that we have our Docker image, we want to push it as an asset to DNAnexus. We can do this using the following command:
# This might take a few minutes, and won't display a progress bar
docker save my-analysis | gzip | dx upload - --path docker-images/my-analysis.tar.gz
Finally, we can run the analysis using the following command:
dx run swiss-army-knife \
-iimage_file=docker-images/my-analysis.tar.gz \
-icmd='Rscript analysis.R'