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

clean-up

parent e5abd7a5
No related branches found
No related tags found
No related merge requests found
Pipeline #83120 passed
#!/bin/bash
# This script fully installs the Nyx tagging UI together with MaggotUBA
# on a newly created user account.
# Some steps are not expected to work from any workstation:
# sample data and restricted-access code are moved from a specific location.
# Additional steps include making a `larvatagger` command to launch the
# Nyx tagging UI, with specific options for our beloved alpha-testers.
if ! [ -x ~/.local/bin/julia ]; then
# install JILL with pip
python3 -m pip install jill
# install Julia with JILL
python3 -m jill install --confirm
fi
# make the `julia` command available on the commandline
export PATH=~/.local/bin:$PATH
# get LarvaTagger.jl source
# (the dev branch is used here for pre-release testing purposes)
git clone https://gitlab.pasteur.fr/nyx/larvatagger.jl LarvaTagger -b dev
cd LarvaTagger
# install LarvaTagger.jl with Pkg
julia --project=. -e 'using Pkg; Pkg.instantiate()'
if ! [ -x ~/.local/bin/larvatagger.jl ]; then
pushd ~/.local/bin
ln -s ~/LarvaTagger/scripts/larvatagger.jl .
popd
fi
# get MaggotUBA source and trained models - open-source part
git clone https://gitlab.pasteur.fr/nyx/MaggotUBA-adapter MaggotUBA -b 20220418
cd MaggotUBA
# install Poetry with pip
python3 -m pip install poetry
# install MaggotUBA with Poetry; this step requires access to a private repo;
# for a new user with no ssh or gpg keys, this is done logging in with `ssh -A` instead of `su`
python3 -m poetry install
cd
# copy sample data
cp -r /home/share/t15 .
example_file="$HOME/t15/GMR_SS02113@UAS_Chrimson_Venus_X_0070/r_LED100_30s2x15s30s#n#n#n@100/20140918_170215/20140918_170215@GMR_SS02113@UAS_Chrimson_Venus_X_0070@t15@r_LED100_30s2x15s30s#n#n#n@100.spine"
# make a `larvatagger` command
if [ $USER = anzhou ]; then
# for user 1
port=9285
else
# for user 2
port=9286
fi
if ! [ -f ~/.bash_aliases ] || [ -z "$(grep 'alias larvatagger=' ~/.bash_aliases)" ]; then
echo "alias larvatagger='$HOME/LarvaTagger/scripts/larvatagger.jl open \"${example_file}\" --port=${port} --backends=\"$HOME/LarvaTagger\"'" >> ~/.bash_aliases
fi
# let the user know about the latter command on every login
if [ -z "$(grep 'echo start the Nyx' ~/.bashrc)" ]; then
cat <<EOT >> ~/.bashrc
echo start the Nyx tagging UI with command: larvatagger
echo or, for a richer interface, type: larvatagger.jl
EOT
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment