Skip to content
Snippets Groups Projects
Commit a4e74272 authored by François  LAURENT's avatar François LAURENT
Browse files

version increment

parent b0dc8699
No related branches found
No related tags found
No related merge requests found
Pipeline #90604 passed
name = "LarvaTagger" name = "LarvaTagger"
uuid = "8b3b36f1-dfed-446e-8561-ea19fe966a4d" uuid = "8b3b36f1-dfed-446e-8561-ea19fe966a4d"
authors = ["François Laurent", "Institut Pasteur"] authors = ["François Laurent", "Institut Pasteur"]
version = "0.5.0" version = "0.6.0"
[deps] [deps]
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
......
...@@ -15,10 +15,10 @@ Alternatively, if you have Docker installed, take a look at the [dedicated instr ...@@ -15,10 +15,10 @@ Alternatively, if you have Docker installed, take a look at the [dedicated instr
``` ```
git clone https://gitlab.pasteur.fr/nyx/larvatagger.jl LarvaTagger git clone https://gitlab.pasteur.fr/nyx/larvatagger.jl LarvaTagger
cd LarvaTagger cd LarvaTagger
julia --project -e 'using Pkg; Pkg.instantiate()' julia --project=. -e 'using Pkg; Pkg.instantiate()'
``` ```
Calling `instantiate` in a copy of the project is preferred to using `Pkg.add`, Calling `Pkg.instantiate` in a copy of the project is preferred over using `Pkg.add`,
because `LarvaTagger.jl` depends on several unregistered packages. because `LarvaTagger.jl` depends on several unregistered packages.
Users who would prefer not to clone the repository or implicitly use the shipped `Manifest.toml` file Users who would prefer not to clone the repository or implicitly use the shipped `Manifest.toml` file
...@@ -27,7 +27,7 @@ can follow the following steps instead: ...@@ -27,7 +27,7 @@ can follow the following steps instead:
``` ```
mkdir LarvaTagger mkdir LarvaTagger
cd LarvaTagger cd LarvaTagger
julia --project -q julia --project=. -q
julia> julia>
(LarvaTagger) pkg> add https://gitlab.pasteur.fr/nyx/PlanarLarvae.jl (LarvaTagger) pkg> add https://gitlab.pasteur.fr/nyx/PlanarLarvae.jl
(LarvaTagger) pkg> add https://gitlab.com/dbc-nyx/ObservationPolicies.jl (LarvaTagger) pkg> add https://gitlab.com/dbc-nyx/ObservationPolicies.jl
...@@ -41,7 +41,7 @@ julia> ...@@ -41,7 +41,7 @@ julia>
In the `LarvaTagger` directory created above, launch the Julia interpreter: In the `LarvaTagger` directory created above, launch the Julia interpreter:
``` ```
julia --project julia --project=.
``` ```
In the interpreter, to launch the editor, type: In the interpreter, to launch the editor, type:
``` ```
...@@ -64,7 +64,7 @@ The script will also launch a Julia interpreter, and give extra guidance on *e.g ...@@ -64,7 +64,7 @@ The script will also launch a Julia interpreter, and give extra guidance on *e.g
## Automatic tagging ## Automatic tagging
To extend the editor with `MaggotUBA` automatic tagging, checkout out the [recommanded installation steps for TaggingBackends and MaggotUBA](https://gitlab.pasteur.fr/nyx/TaggingBackends#recommanded-installation-and-troubleshooting). To extend the editor with `MaggotUBA` automatic tagging, checkout out the [recommended installation steps for TaggingBackends and MaggotUBA](https://gitlab.pasteur.fr/nyx/TaggingBackends#recommended-installation).
If the backend directory is created right in the `LarvaTagger` directory, `LarvaTagger.jl` will automatically find it. If the backend directory is created right in the `LarvaTagger` directory, `LarvaTagger.jl` will automatically find it.
...@@ -78,11 +78,11 @@ Similarly, to let *larvatagger.jl* know about MaggotUBA: ...@@ -78,11 +78,11 @@ Similarly, to let *larvatagger.jl* know about MaggotUBA:
scripts/larvatagger.jl open <path/to/data/file> --backends=<path/to/MaggotUBA's/parent/directory> --browser scripts/larvatagger.jl open <path/to/data/file> --backends=<path/to/MaggotUBA's/parent/directory> --browser
``` ```
The larvatagger.jl script can be used to proceed with training a new tagger: The larvatagger.jl script can also be used to train a new tagger:
``` ```
scripts/larvatagger.jl train <path/to/backend> <path/to/data/repository> <tagger-name> scripts/larvatagger.jl train <path/to/backend> <path/to/data/repository> <tagger-name>
``` ```
and applying a tagger to a tracking data file: and apply this tagger to a tracking data file:
``` ```
scripts/larvatagger.jl predict <path/to/backend> <tagger-name> <path/to/data/file> --skip-make-dataset scripts/larvatagger.jl predict <path/to/backend> <tagger-name> <path/to/data/file> --skip-make-dataset
``` ```
......
# To be built with scripts/larvatagger.sh build --dev
FROM julia:1.8.2-bullseye FROM julia:1.8.2-bullseye
ENV JULIA_PROJECT=/app/TaggingBackends ENV JULIA_PROJECT=/app/TaggingBackends
ENV JULIA_DEPOT_PATH=/usr/local/share/julia ENV JULIA_DEPOT_PATH=/usr/local/share/julia
ENV POETRY_VIRTUALENVS_PATH=/usr/local/share/poetry ENV POETRY_VIRTUALENVS_PATH=/usr/local/share/poetry
# We assume:
# * current directory name is LarvaTagger; contains the LarvaTagger.jl project;
# * PlanarLarvae.jl project is available as sibling directory PlanarLarvae;
# * TaggingBackends project is available as sibling directory TaggingBackends;
# * MaggotUBA-core project is available as sibling directory MaggotUBA-core;
# * MaggotUBA-adapter project is available as sibling directory MaggotUBA-adapter.
# Paths are given relative to parent directory, since larvatagger.sh will move 1 level up
# prior to calling docker build
ARG PLANARLARVAE=./PlanarLarvae ARG PLANARLARVAE=./PlanarLarvae
ARG LARVATAGGER=./LarvaTagger ARG LARVATAGGER=./LarvaTagger
ARG TAGGINGBACKENDS=./TaggingBackends ARG TAGGINGBACKENDS=./TaggingBackends
ARG MAGGOTUBA_CORE=./MaggotUBA-core ARG MAGGOTUBA_CORE=./MaggotUBA-core
ARG MAGGOTUBA_ADAPTER=./maggot ARG MAGGOTUBA_ADAPTER=./MaggotUBA-adapter
COPY $PLANARLARVAE/src /app/PlanarLarvae/src COPY $PLANARLARVAE/src /app/PlanarLarvae/src
COPY $PLANARLARVAE/Project.toml $PLANARLARVAE/Manifest.toml /app/PlanarLarvae/ COPY $PLANARLARVAE/Project.toml $PLANARLARVAE/Manifest.toml /app/PlanarLarvae/
......
...@@ -58,7 +58,16 @@ else ...@@ -58,7 +58,16 @@ else
DOCKER_ARGS="-p $LARVATAGGER_PORT:$LARVATAGGER_PORT" DOCKER_ARGS="-p $LARVATAGGER_PORT:$LARVATAGGER_PORT"
TAGGER_ARGS="--port=$LARVATAGGER_PORT" TAGGER_ARGS="--port=$LARVATAGGER_PORT"
fi fi
file=$1; shift file=$1; shift
# undocumented feature
backend=MaggotUBA
while [ -n "$1" -a "$1" = "--external-instance" ]; do
instance=$2; shift 2
RUN_ARGS="$RUN_ARGS --mount type=bind,src=$(realpath $instance),dst=/app/$backend/models/$(basename $instance)"
done
exec docker run $RUN_ARGS -i $DOCKER_ARGS "$LARVATAGGER_IMAGE" open "/data/$file" $TAGGER_ARGS $@ exec docker run $RUN_ARGS -i $DOCKER_ARGS "$LARVATAGGER_IMAGE" open "/data/$file" $TAGGER_ARGS $@
;; ;;
......
...@@ -117,7 +117,7 @@ so that the actual user is known. ...@@ -117,7 +117,7 @@ so that the actual user is known.
function check_permissions(file) function check_permissions(file)
try try
uid, gid = ENV["HOST_UID"], ENV["HOST_GID"] uid, gid = ENV["HOST_UID"], ENV["HOST_GID"]
@info "Changing file ownership" uid gid file @debug "Changing file ownership" uid gid file
chown(file, parse(Int, uid), parse(Int, gid)) chown(file, parse(Int, uid), parse(Int, gid))
catch catch
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment