Skip to content

Commit

Permalink
Update MGnifyR repo (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
SandyRogers authored Nov 9, 2023
1 parent 51904dc commit 93e738c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: '3'

env:
NB_DOCKER_EXE: "docker"

tasks:
add-py-notebook:
summary: |
Expand Down Expand Up @@ -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: |
Expand All @@ -53,15 +56,15 @@ 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: |
Builds a docker image with Quarto included, for statically rendering the notebook outputs.
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
Expand All @@ -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/**/*
Expand All @@ -84,15 +87,15 @@ 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:
summary: |
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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion dependencies/dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 93e738c

Please sign in to comment.