Skip to content

Using docker

Joelle Mbatchou edited this page Dec 27, 2020 · 26 revisions

Installing docker

First, you need to install docker on your computing system. Here are some guides to install it:

Obtaining Regenie image

Building image using DockerFile

Once you have docker installed and running, you can use the following command to build the image which uses the DockerFiles in the Github repository.

cd /src/
git clone https://github.com/rgcgithub/regenie
cd regenie
make docker-build ## Add 'HAS_BOOST_IOSTREAM=1' and/or 'STATIC=1 MKLROOT=/root/' to compile with Boost Iostream/Intel MKL

This will build the Regenie docker image and you can check the list of available images using

docker image ls

Pulling image from Github

Alternatively, you can pull the image from the Github repository. You will first need to authenticate to GitHub Container Registry using your Github personal access token, which can be obtained following these instructions.

Once you have the token which we assume is saved in the file 'GH_TOKEN.txt', you can authenticate using

cat GH_TOKEN.txt | docker login ghcr.io -u USERNAME --password-stdin

where USERNAME corresponds to your GitHub username.

Finally, you can pull the image (located here) using for example

docker pull docker.pkg.github.com/rgcgithub/regenie/regenie:v1.0.6.7.gz

Running example commands

Sample regenie commands are included in the script 'test/test_docker.sh' in the Regenie source directory. To run these, you can use

make docker-test ## Add 'HAS_BOOST_IOSTREAM=1' and/or 'STATIC=1 MKLROOT=/root/' if compiled with Boost Iostream/Intel MKL

If no issues are encountered, you should see a template command for running Regenie with docker at the end

docker run -v <host_path>:<mount_path> regenie:v1.0.6.7.gz regenie <command_options>

where <host_path> is the folder (use absolute path) on the machine which is mounted to the docker container (multiple mount points can be used) and <mount_path> is the folder where it is mounted in the container.

For example, a command running Regenie step 1 is:

docker run -v /src/regenie/:/docker/ regenie:v1.0.6.7.gz regenie \
--step 1 \
--bed /docker/example/example \
--exclude /docker/example/snplist_rm.txt \
--covarFile /docker/example/covariates.txt \
--phenoFile /docker/example/phenotype_bin.txt \
--remove /docker/example/fid_iid_to_remove.txt \
--bsize 100 \
--bt \
--lowmem \
--out /docker/test/fit_bin_out

Clone this wiki locally