Skip to content

Commit

Permalink
wrapper for containers
Browse files Browse the repository at this point in the history
  • Loading branch information
explodecomputer committed Oct 19, 2024
1 parent a38c80f commit f1bbfd0
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
renv/library
renv/staging
.git
config.env
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ RUN R -e 'options( \
install.packages("renv", dependencies = TRUE); \
renv::restore()'

COPY . .
10 changes: 10 additions & 0 deletions check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

source config.env

Rscript -e "renv::status()"

./bin/plink2 --version
./bin/flashpca --version
./bin/gcta-1.94.1
./bin/king
25 changes: 25 additions & 0 deletions run_apptainer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

source config.env

apptainer pull -F docker://MRCIEU/lifecourse-gwas:latest

# Run without pwd binding

d=${PWD}
echo $d
td=$(mktemp -d)
cd $td

apptainer run \
--bind "${d}/config.env:/project/config.env" \
--bind "${phenotype_input_dir}:${phenotype_input_dir}" \
--bind "${phenotype_processed_dir}:${phenotype_processed_dir}" \
--bind "${genotype_input_dir}:${genotype_input_dir}" \
--bind "${genotype_processed_dir}:${genotype_processed_dir}" \
--bind "${results_dir}:${results_dir}" \
--cwd /project \
${d}/lifecourse-gwas_latest.sif \
"$@"

cd $d
18 changes: 18 additions & 0 deletions run_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -e

source config.env

# docker build -t mrcieu/lifecourse-gwas:latest .
# docker pull mrcieu/lifecourse-gwas:latest

docker run \
-v "${PWD}/config.env:/project/config.env:ro" \
-v ${phenotype_input_dir}:${phenotype_input_dir} \
-v ${phenotype_processed_dir}:${phenotype_processed_dir} \
-v ${genotype_input_dir}:${genotype_input_dir} \
-v ${genotype_processed_dir}:${genotype_processed_dir} \
-v ${results_dir}:${results_dir} \
MRCIEU/lifecourse-gwas:latest \
"$@"

0 comments on commit f1bbfd0

Please sign in to comment.