diff --git a/Taskfile.yml b/Taskfile.yml index a8f03bc..9f02bdf 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,5 +1,8 @@ version: '3' +env: + NB_DOCKER_EXE: "docker" + tasks: add-py-notebook: summary: | @@ -43,7 +46,7 @@ tasks: The files in src/notebooks are mounted as editable, and served on port 8888. cmds: - - docker run -it -v $PWD/src/notebooks:/home/jovyan/mgnify-examples -p 8888:8888 quay.io/microbiome-informatics/emg-notebooks.dev:latest + - $NB_DOCKER_EXE run -it -v $PWD/src/notebooks:/home/jovyan/mgnify-examples -p 8888:8888 quay.io/microbiome-informatics/emg-notebooks.dev:latest build-notebook-docker: summary: | @@ -53,7 +56,7 @@ tasks: NOT needed if you're just editing/adding notebooks with no additional dependencies. cmds: - - docker build --load -f docker/Dockerfile -t quay.io/microbiome-informatics/emg-notebooks.dev:latest . + - $NB_DOCKER_EXE build --load -f docker/Dockerfile -t quay.io/microbiome-informatics/emg-notebooks.dev:latest . build-static-docker: summary: | @@ -61,7 +64,7 @@ tasks: The built image is tagged as `notebooks-static`. cmds: - - docker build --load -f docker/docs.Dockerfile -t notebooks-static . + - $NB_DOCKER_EXE build --load -f docker/docs.Dockerfile -t notebooks-static . sources: - docker/docs.Dockerfile - docker/Dockerfile @@ -72,7 +75,7 @@ tasks: The site is built to ./_site cmds: - - docker run -it -v $PWD:/opt/repo -w /opt/repo notebooks-static render --execute + - $NB_DOCKER_EXE run -it -v $PWD:/opt/repo -w /opt/repo notebooks-static render --execute deps: [build-static-docker] sources: - src/**/* @@ -84,7 +87,7 @@ tasks: This serves the contents of ./_site cmds: - echo "Browse to http://127.0.0.1:4444" - - docker run -it -v $PWD:/opt/repo -w /opt/repo/_site -p 4444:4444 --entrypoint python notebooks-static -m http.server 4444 + - $NB_DOCKER_EXE run -it -v $PWD:/opt/repo -w /opt/repo/_site -p 4444:4444 --entrypoint python notebooks-static -m http.server 4444 deps: [render-static] preview-static: @@ -92,7 +95,7 @@ tasks: Runs, renders, and serves the notebooks as a static website, watching for changes cmds: - echo 'When the rendering is finished, the static preview of notebooks will be at http://127.0.0.1:4444 ...' - - docker run -it -v $PWD:/opt/repo -w /opt/repo -p 4444:4444 notebooks-static preview --no-browser --port 4444 --host 0.0.0.0 + - $NB_DOCKER_EXE run -it -v $PWD:/opt/repo -w /opt/repo -p 4444:4444 notebooks-static preview --no-browser --port 4444 --host 0.0.0.0 deps: [build-static-docker] update-mgnifyr-cache: @@ -105,4 +108,4 @@ tasks: It writes a zip of the cache to dependencies/mgnify-cache.tgz cmds: - - docker run -it -v $PWD/dependencies:/opt/dependencies -w /opt/dependencies quay.io/microbiome-informatics/emg-notebooks.dev:latest /bin/bash zip-mgnifyr-cache.sh + - $NB_DOCKER_EXE run -it -v $PWD/dependencies:/opt/dependencies -w /opt/dependencies quay.io/microbiome-informatics/emg-notebooks.dev:latest /bin/bash zip-mgnifyr-cache.sh diff --git a/dependencies/dependencies.R b/dependencies/dependencies.R index 88f998e..1859a42 100644 --- a/dependencies/dependencies.R +++ b/dependencies/dependencies.R @@ -3,4 +3,4 @@ # Extra pacakges not installed in Docker image, or installable via Conda: require("devtools") -devtools::install_github("beadyallen/MGnifyR") +devtools::install_github("EBI-Metagenomics/MGnifyR", ref="d1baca93465f8c97101049bd66b63a8bb5a0d6ab")