From 535ff4230a653cdd0b14b9154287aab1f571bfc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laurent?= <francois.laurent@posteo.net> Date: Wed, 15 Mar 2023 11:29:21 +0100 Subject: [PATCH] version increment --- Project.toml | 2 +- recipes/Dockerfile | 9 +++++++++ recipes/README.md | 18 ++++++++++++------ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index 4721d91..b5ddd1c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "LarvaTagger" uuid = "8b3b36f1-dfed-446e-8561-ea19fe966a4d" authors = ["François Laurent", "Institut Pasteur"] -version = "0.11.1" +version = "0.12" [deps] Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" diff --git a/recipes/Dockerfile b/recipes/Dockerfile index 96665c4..e1726de 100644 --- a/recipes/Dockerfile +++ b/recipes/Dockerfile @@ -81,6 +81,15 @@ RUN if [ "$BACKEND" = "MaggotUBA/20221005-1" ]; then \ && rm -rf .git \ && poetry install --only main \ && poetry add "pynvml==11.4.1" \ + && rm -rf ~/.cache; \ + elif [ "$BACKEND" = "MaggotUBA/20230311" ]; then \ + cd $PROJECT_DIR \ + && julia -e "using Pkg; Pkg.add(url=\"https://gitlab.pasteur.fr/nyx/TaggingBackends\", rev=\"$BRANCH\")" \ + && git clone --depth 1 --no-tags --single-branch -b 20230311 https://gitlab.pasteur.fr/nyx/MaggotUBA-adapter MaggotUBA \ + && cd MaggotUBA \ + && rm -rf .git \ + && poetry install --only main \ + && poetry add "pynvml==11.4.1" \ && rm -rf ~/.cache; \ fi diff --git a/recipes/README.md b/recipes/README.md index 42daaa6..2b3356b 100644 --- a/recipes/README.md +++ b/recipes/README.md @@ -76,14 +76,14 @@ The *larvatagger.sh* script features a `build` command to build a local Docker i scripts/larvatagger.sh build ``` -Optionally, you can also get the default backend (currently *MaggotUBA/20230129*) with: +Optionally, you can also get the default backend (currently *MaggotUBA/20230311*) with: ``` scripts/larvatagger.sh build --with-default-backend ``` -If you specifically want the *20230129* tagger, and not rely on the default set in the script, do: +If you specifically want the *20230311* tagger, and not rely on the default set in the script, do: ``` -scripts/larvatagger.sh build --with-backend MaggotUBA/20230129 +scripts/larvatagger.sh build --with-backend MaggotUBA/20230311 ``` The `build` command requires a local copy of the LarvaTagger.jl project. In addition, the larvatagger.sh script must be executed from the project root directory, hence the path `scripts/larvatagger.sh`. @@ -102,7 +102,7 @@ docker pull flaur/larvatagger ``` Beware that images that ship with backends are relatively large files (>5GB on disk). -If you are not interested in automatic tagging, use the `flaur/larvatagger:0.11.1-standalone` image instead. +If you are not interested in automatic tagging, use the `flaur/larvatagger:0.12-standalone` image instead. ### Upgrading @@ -211,9 +211,15 @@ Docker is usually not available on shared HPC resources. [Singularity](https://sylabs.io/) or [Apptainer](http://apptainer.org/) are used instead, and the Docker image for LarvaTagger.jl can be run using these technologies. An issue with the `predict` and `train` switches makes the backend unable to use the internal */app/MaggotUBA/data* directory to organise the raw, interim and processed data files. -A workaround consists in using an external *data* directory and bind mount it as */app/MaggotUBA/data*. +A workaround consists in using an external *apptainer-data* directory and bind mount it as */app/MaggotUBA/data*. For example: ``` -apptainer run --bind data:/app/MaggotUBA/data docker://flaur/larvatagger predict /app/MaggotUBA 20230129 path/to/datafile --data-isolation +apptainer run --bind apptainer-data:/app/MaggotUBA/data docker://flaur/larvatagger predict /app/MaggotUBA 20230311 path/to/datafile --data-isolation ``` + +Depending on where the data file is located in the file system, the parent directory may also need to be bind-mounted. + +Running Docker containers may not be accessible from worker nodes. A workaround consists in converting the Docker image into a Singularity image file for Apptainer, and then call `apptainer run` for that *sif* image. + +See also a [deployment example](https://gitlab.com/larvataggerpipelines/t5_analysis_replicates/-/blob/0db595945b6c2d1bdf7147b136807b11c41d52dc/Makefile.maestro#L53). -- GitLab