Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LarvaTagger.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nyx
LarvaTagger.jl
Commits
a83df5d3
Commit
a83df5d3
authored
1 month ago
by
François LAURENT
Browse files
Options
Downloads
Patches
Plain Diff
new install defaults
parent
53a879ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!24
Set of commits to be tagged v0.20
Pipeline
#153534
passed
1 month ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Manifest-v1.11.toml
+2
-2
2 additions, 2 deletions
Manifest-v1.11.toml
Manifest.toml
+2
-2
2 additions, 2 deletions
Manifest.toml
scripts/install.sh
+75
-6
75 additions, 6 deletions
scripts/install.sh
with
79 additions
and
10 deletions
Manifest-v1.11.toml
+
2
−
2
View file @
a83df5d3
...
@@ -997,11 +997,11 @@ version = "1.2.0"
...
@@ -997,11 +997,11 @@ version = "1.2.0"
[[deps.NyxWidgets]]
[[deps.NyxWidgets]]
deps
=
[
"Bonito"
,
"Colors"
,
"Format"
,
"LazyArtifacts"
,
"Observables"
]
deps
=
[
"Bonito"
,
"Colors"
,
"Format"
,
"LazyArtifacts"
,
"Observables"
]
git-tree-sha1
=
"
d5addf940e4265b3ca2a6fe29b8ff24bf3b13b98
"
git-tree-sha1
=
"
cdc029870ac2ab9522e700f3e2b3209b33389fa4
"
repo-rev
=
"main"
repo-rev
=
"main"
repo-url
=
"https://gitlab.com/dbc-nyx/NyxWidgets.jl"
repo-url
=
"https://gitlab.com/dbc-nyx/NyxWidgets.jl"
uuid
=
"c288fd06-43d3-4b04-8307-797133353e2e"
uuid
=
"c288fd06-43d3-4b04-8307-797133353e2e"
version
=
"0.2.
1
"
version
=
"0.2.
2
"
[[deps.Observables]]
[[deps.Observables]]
git-tree-sha1
=
"7438a59546cf62428fc9d1bc94729146d37a7225"
git-tree-sha1
=
"7438a59546cf62428fc9d1bc94729146d37a7225"
...
...
This diff is collapsed.
Click to expand it.
Manifest.toml
+
2
−
2
View file @
a83df5d3
...
@@ -985,11 +985,11 @@ version = "1.2.0"
...
@@ -985,11 +985,11 @@ version = "1.2.0"
[[deps.NyxWidgets]]
[[deps.NyxWidgets]]
deps
=
[
"Bonito"
,
"Colors"
,
"Format"
,
"LazyArtifacts"
,
"Observables"
]
deps
=
[
"Bonito"
,
"Colors"
,
"Format"
,
"LazyArtifacts"
,
"Observables"
]
git-tree-sha1
=
"
d5addf940e4265b3ca2a6fe29b8ff24bf3b13b98
"
git-tree-sha1
=
"
cdc029870ac2ab9522e700f3e2b3209b33389fa4
"
repo-rev
=
"main"
repo-rev
=
"main"
repo-url
=
"https://gitlab.com/dbc-nyx/NyxWidgets.jl"
repo-url
=
"https://gitlab.com/dbc-nyx/NyxWidgets.jl"
uuid
=
"c288fd06-43d3-4b04-8307-797133353e2e"
uuid
=
"c288fd06-43d3-4b04-8307-797133353e2e"
version
=
"0.2.
1
"
version
=
"0.2.
2
"
[[deps.Observables]]
[[deps.Observables]]
git-tree-sha1
=
"7438a59546cf62428fc9d1bc94729146d37a7225"
git-tree-sha1
=
"7438a59546cf62428fc9d1bc94729146d37a7225"
...
...
This diff is collapsed.
Click to expand it.
scripts/install.sh
+
75
−
6
View file @
a83df5d3
#!/usr/bin/env bash
#!/usr/bin/env bash
for
flag
in
"
$@
"
;
do
if
[
"
$flag
"
=
"-h"
-o
"
$flag
"
=
"--help"
]
;
then
echo
"Command-line installer for LarvaTagger"
echo
echo
"Usage:"
echo
"
$0
"
echo
" WITH_BACKEND=1
$0
"
echo
" WITH_BACKEND=1
$0
--legacy"
echo
"
$0
--with-default-backend"
echo
"
$0
--with-backend --legacy"
echo
"
$0
--uninstall"
echo
"
$0
--help"
echo
echo
"The legacy installation path for the MaggotUBA-based tagger relies"
echo
"on Python3.8 and Torch1."
echo
"The current default relies on Python3.11 and Torch2."
echo
"Other environment variables can be set, similarly to WITH_BACKEND,"
echo
"to control the script's behavior:"
echo
" variable default value"
echo
" BIN_DIR ~/.local/bin"
echo
" LARVATAGGER_PATH ~/.local/share/larvatagger"
echo
" JULIA_CHANNEL lts"
echo
" JULIA_VERSION 1.10"
echo
" PYTHON_VERSION 3.11 (3.8 if --legacy)"
echo
" MAGGOTUBA_CORE_BRANCH main"
echo
" MAGGOTUBA_ADAPTER_BRANCH torch2 (main if --legacy)"
echo
" TAGGINGBACKENDS_BRANCH main"
echo
" PLANARLARVAE_BRANCH main"
echo
" LARVATAGGER_BRANCH main"
exit
0
fi
done
[
-d
"
`
pwd
`
"
]
||
cd
[
-d
"
`
pwd
`
"
]
||
cd
if
[
-z
"
$BIN_DIR
"
]
;
then
if
[
-z
"
$BIN_DIR
"
]
;
then
...
@@ -41,28 +74,47 @@ if [ "$1" = "--uninstall" ]; then
...
@@ -41,28 +74,47 @@ if [ "$1" = "--uninstall" ]; then
fi
fi
else
else
# former default:
PYTHON_VERSION
=
3.8
PYTHON_VERSION
=
3.8
# the internal_<VAR> variables need to be set non-empty only if
# the internal_<VAR> variables need to be set non-empty only if
# the corresponding <VAR> variable is non-empty; they are used to
# the corresponding <VAR> variable is non-empty; they are used to
# determine whether or not to report externally sourced variables
# determine whether or not to report externally sourced variables
internal_WITH_BACKEND
=
internal_WITH_BACKEND
=
internal_MAGGOTUBA_ADAPTER_BRANCH
=
internal_MAGGOTUBA_ADAPTER_BRANCH
=
internal_MAGGOTUBA_ADAPTER_FREE_DEPENDENCIES
=
internal_MAGGOTUBA_ADAPTER_FREE_DEPENDENCIES
=
internal_LEGACY
=
internal_WITH_DEFAULT_BACKEND
=
# primary use cases:
# WITH_BACKEND=1 scripts/install.sh
# WITH_BACKEND=1 scripts/install.sh --legacy
# scripts/install.sh --with-default-backend
# scripts/install.sh --with-backend
# scripts/install.sh --with-backend --experimental
# scripts/install.sh --with-backend --legacy
for
arg
in
"
$@
"
;
do
for
arg
in
"
$@
"
;
do
if
[
"
$arg
"
=
"--with-default-backend"
]
;
then
if
[
"
$arg
"
=
"--with-default-backend"
]
;
then
WITH_BACKEND
=
1
WITH_BACKEND
=
1
internal_WITH_BACKEND
=
1
internal_WITH_BACKEND
=
1
MAGGOTUBA_CORE_BRANCH
=
internal_WITH_DEFAULT_BACKEND
=
1
MAGGOTUBA_ADAPTER_BRANCH
=
if
[
"
$internal_LEGACY
"
=
"1"
]
;
then
echo
"Ignoring --legacy; pass --with-backend --legacy instead"
internal_LEGACY
=
0
fi
break
break
elif
[
"
$arg
"
=
"--with-backend"
]
;
then
elif
[
"
$arg
"
=
"--with-backend"
]
;
then
WITH_BACKEND
=
1
WITH_BACKEND
=
1
internal_WITH_BACKEND
=
1
internal_WITH_BACKEND
=
1
elif
[
"
$arg
"
=
"--experimental"
]
;
then
elif
[
"
$arg
"
=
"--experimental"
]
;
then
echo
"The --experimental flag is deprecated and is now default"
internal_LEGACY
=
0
elif
[
"
$arg
"
=
"--legacy"
]
;
then
internal_LEGACY
=
1
MAGGOTUBA_CORE_BRANCH
=
MAGGOTUBA_CORE_BRANCH
=
MAGGOTUBA_ADAPTER_BRANCH
=
torch2
# former default (empty) falls back to main
internal_MAGGOTUBA_ADAPTER_BRANCH
=
1
MAGGOTUBA_ADAPTER_BRANCH
=
PYTHON_VERSION
=
3.11
elif
[
"
$arg
"
=
"--free-python-dependencies"
]
;
then
elif
[
"
$arg
"
=
"--free-python-dependencies"
]
;
then
internal_MAGGOTUBA_ADAPTER_FREE_DEPENDENCIES
=
1
internal_MAGGOTUBA_ADAPTER_FREE_DEPENDENCIES
=
1
elif
[
"
$arg
"
=
"--lock-python-dependencies"
]
;
then
elif
[
"
$arg
"
=
"--lock-python-dependencies"
]
;
then
...
@@ -70,6 +122,23 @@ for arg in "$@"; do
...
@@ -70,6 +122,23 @@ for arg in "$@"; do
fi
fi
done
done
if
[
"
$WITH_BACKEND
"
=
"1"
-a
"
$internal_LEGACY
"
=
"0"
]
;
then
# new defaults (formerly "--experimental")
MAGGOTUBA_CORE_BRANCH
=
MAGGOTUBA_ADAPTER_BRANCH
=
torch2
internal_MAGGOTUBA_ADAPTER_BRANCH
=
1
PYTHON_VERSION
=
3.11
elif
[
"
$internal_LEGACY
"
!=
"1"
]
;
then
if
[
"
$internal_WITH_DEFAULT_BACKEND
"
=
"1"
]
;
then
echo
"The Python3.11/Torch2 backend is now default"
echo
"Pass flags --with-backend --legacy to select the former Python3.8/Torch1 backend"
fi
MAGGOTUBA_CORE_BRANCH
=
MAGGOTUBA_ADAPTER_BRANCH
=
torch2
internal_MAGGOTUBA_ADAPTER_BRANCH
=
1
PYTHON_VERSION
=
3.11
fi
PYTHON
=
"python
$PYTHON_VERSION
"
PYTHON
=
"python
$PYTHON_VERSION
"
check_brew
()
{
check_brew
()
{
...
@@ -266,7 +335,7 @@ if [ -d LarvaTagger.jl ]; then
...
@@ -266,7 +335,7 @@ if [ -d LarvaTagger.jl ]; then
echo
"LarvaTagger.jl installation found; skipping"
echo
"LarvaTagger.jl installation found; skipping"
else
else
if
[
-z
"
$LARVATAGGER_BRANCH
"
]
;
then
if
[
-z
"
$LARVATAGGER_BRANCH
"
]
;
then
LARVATAGGER_BRANCH
=
dev
LARVATAGGER_BRANCH
=
main
else
else
echo
"Using environment variable: LARVATAGGER_BRANCH=
$LARVATAGGER_BRANCH
"
echo
"Using environment variable: LARVATAGGER_BRANCH=
$LARVATAGGER_BRANCH
"
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment