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
a2ec392e
Commit
a2ec392e
authored
2 years ago
by
François LAURENT
Browse files
Options
Downloads
Patches
Plain Diff
bugfix with trailing arguments
parent
988a5487
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#100195
passed
2 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/larvatagger.ps1
+10
-4
10 additions, 4 deletions
scripts/larvatagger.ps1
src/cli.jl
+1
-1
1 addition, 1 deletion
src/cli.jl
with
11 additions
and
5 deletions
scripts/larvatagger.ps1
+
10
−
4
View file @
a2ec392e
...
...
@@ -36,13 +36,14 @@ function Call1 {
$args
=
$args
-split
' '
$cmd
=
$args
[
0
]
$path
=
Convert-Path
$args
[
1
]
$args
=
$args
[
2
..
$args
.
GetUpperBound
(
0
)]
$
extra
args
=
$args
[
2
..
(
$args
.
count
-
1
)]
if
(
$cmd
-eq
'open'
)
{
$runargs
=
'-p'
,
'9284:9284'
,
'-i'
}
$parentdir
=
Split-Path
-Parent
$path
$filename
=
Split-Path
-Leaf
$path
docker
run
$runargs
-v
${parentdir}
:
/data
$LARVATAGGER_IMAGE
$cmd
/data/
$filename
$args
Write-Host
"docker run
$runargs
-v
${parentdir}
:/data
$LARVATAGGER_IMAGE
$cmd
/data/
$filename
$extraargs
"
docker
run
$runargs
-v
${parentdir}
:
/data
$LARVATAGGER_IMAGE
$cmd
/data/
$filename
$extraargs
}
Switch
(
$args
[
0
])
...
...
@@ -72,6 +73,7 @@ Switch ($args[0])
docker
run
$LARVATAGGER_IMAGE
--version
}
'--update'
{
Write-Host
"docker pull flaur/larvatagger:latest"
docker
pull
flaur/larvatagger:latest
}
'open'
{
...
...
@@ -97,7 +99,9 @@ Switch ($args[0])
New-Item
-Path
$modelsdir
-ItemType
'directory'
}
$taggername
=
Split-Path
-Leaf
$taggerpath
docker
run
--mount
"type=bind,src=
$modelsdir
,dst=/app/
$TAGGING_BACKEND
/models"
-v
${parentdir}
:
/data
$LARVATAGGER_IMAGE
train
/app/
$TAGGING_BACKEND
/data/
$dirname
$taggername
$extraargs
=
$args
[
3
..
(
$args
.
count
-
1
)]
Write-Host
"docker run --mount
`"
type=bind,src=
$modelsdir
,dst=/app/
$TAGGING_BACKEND
/models
`"
-v
${parentdir}
:/data
$LARVATAGGER_IMAGE
train /app/
$TAGGING_BACKEND
/data/
$dirname
$taggername
$extraargs
"
docker
run
--mount
"type=bind,src=
$modelsdir
,dst=/app/
$TAGGING_BACKEND
/models"
-v
${parentdir}
:
/data
$LARVATAGGER_IMAGE
train
/app/
$TAGGING_BACKEND
/data/
$dirname
$taggername
$extraargs
}
'predict'
{
$path
=
Convert-Path
$args
[
1
]
...
...
@@ -112,6 +116,8 @@ Switch ($args[0])
}
$parentdir
=
Split-Path
-Parent
$path
$filename
=
Split-Path
-Leaf
$path
docker
run
$runargs
-v
${parentdir}
:
/data
$LARVATAGGER_IMAGE
predict
/app/
$TAGGING_BACKEND
$taggername
/data/
$filename
$extraargs
=
$args
[
3
..
(
$args
.
count
-
1
)]
Write-Host
"docker run
$runargs
-v
${parentdir}
:/data
$LARVATAGGER_IMAGE
predict /app/
$TAGGING_BACKEND
$taggername
/data/
$filename
$extraargs
"
docker
run
$runargs
-v
${parentdir}
:
/data
$LARVATAGGER_IMAGE
predict
/app/
$TAGGING_BACKEND
$taggername
/data/
$filename
$extraargs
}
}
This diff is collapsed.
Click to expand it.
src/cli.jl
+
1
−
1
View file @
a2ec392e
...
...
@@ -280,7 +280,7 @@ function main(args=ARGS; exit_on_error=true)
@info
"The server is ready at http://127.0.0.1:
$(port)
"
end
if
verbose
@info
"Press Ctrl+D to stop the server"
@info
"Press Ctrl+D to stop the server
(or Ctrl+C if in PowerShell)
"
end
return
server
...
...
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