Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine-core
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
AURA
engine-core
Commits
3ca42567
Commit
3ca42567
authored
4 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Start docker from run script.
#17
parent
e6033d65
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
run.sh
+20
-44
20 additions, 44 deletions
run.sh
with
20 additions
and
44 deletions
run.sh
+
20
−
44
View file @
3ca42567
...
@@ -7,19 +7,18 @@ docker="false"
...
@@ -7,19 +7,18 @@ docker="false"
#
#
# Call with one of these parameters:
# Call with one of these parameters:
#
#
# - init
# - engine
# - engine
# - core
# - core
# - lqs
# - lqs
# - recreate-database
# - recreate-database
# - docker:engine
# - docker:engine
# - docker:core
# - docker:lqs
# - docker:recreate-database
# - docker:build
# - docker:build
# - docker:push
#
#
if
[[
$*
=
~ ^
(
engine|core|lqs
)
$
]]
;
then
if
[[
$*
=
~ ^
(
init|env|
engine|core|lqs
)
$
]]
;
then
mode
=
$1
mode
=
$1
fi
fi
...
@@ -38,9 +37,17 @@ echo "[ Docker=$docker ]"
...
@@ -38,9 +37,17 @@ echo "[ Docker=$docker ]"
if
[[
$docker
==
"false"
]]
;
then
if
[[
$docker
==
"false"
]]
;
then
### Initializes the environment & installs dependencies ###
if
[[
$mode
==
"init"
]]
;
then
mkdir
-p
logs
pip3
install
-r
requirements.txt
fi
### Runs Engine Core & Liquidsoap ###
### Runs Engine Core & Liquidsoap ###
if
[[
$mode
==
"engine"
]]
;
then
if
[[
$mode
==
"engine"
]]
;
then
eval
$(
opam
env
)
/usr/bin/env python3.7 engine-core.py
/usr/bin/env python3.7 engine-core.py
fi
fi
...
@@ -74,49 +81,18 @@ if [[ $docker == "true" ]]; then
...
@@ -74,49 +81,18 @@ if [[ $docker == "true" ]]; then
### Runs Engine Core & Liquidsoap ###
### Runs Engine Core & Liquidsoap ###
if
[[
$mode
==
"engine"
]]
;
then
if
[[
$mode
==
"engine"
]]
;
then
exec sudo
docker run
--name
aura-engine
--rm
-it
\
exec sudo
docker run
\
-u
$UID
:
$GID
\
--network
=
"host"
\
-p
127.0.0.1:8050:5000
\
--name
aura-engine
\
-v
"
$BASE_D
"
:/srv
\
--rm
-d
\
-v
"
$BASE_D
/configuration/"
:/etc/aura
\
--tmpfs
/var/log/aura/ autoradio/engine /srv/engine-core.py
fi
### Runs Engine Core only ###
if
[[
$mode
==
"core"
]]
;
then
exec sudo
docker run
--name
aura-engine-core
--rm
-it
\
-u
$UID
:
$GID
\
-u
$UID
:
$GID
\
-p
127.0.0.1:8050:5000
\
-v
"
$BASE_D
"
:/srv
\
-v
"
$BASE_D
"
:/srv
\
-v
"
$BASE_D
/configuration/"
:/etc/aura
\
-v
"
$BASE_D
/audio/source"
:/home/opam/audio/source:ro
\
--tmpfs
/var/log/aura/ autoradio/engine /srv/engine-core.py
"--without-lqs"
-v
"
$BASE_D
/configuration/docker"
:/etc/aura
\
fi
-v
"/dev/snd"
:/dev/snd
\
--privileged
\
### Runs Liquidsoap only ###
if
[[
$mode
==
"lqs"
]]
;
then
lqs
=
$(
/usr/bin/env python3.7 engine-core.py
--get-lqs-command
)
eval
"
$lqs
"
exec sudo
docker run
--name
aura-engine-liquidsoap
--rm
-it
\
-u
1000:1000
\
-v
"
$BASE_D
"
:/srv
\
-v
"
$BASE_D
/configuration/"
:/etc/aura
\
--tmpfs
/var/log/aura/
\
--tmpfs
/var/log/aura/
\
--device
/dev/snd autoradio/engine /bin/bash
\
autoradio/engine
-c
"cd /srv/modules/liquidsoap && liquidsoap --debug --verbose engine.liq"
fi
### CAUTION: This deletes everything in your database ###
if
[[
$mode
==
"recreate-database"
]]
;
then
exec sudo
docker run
--rm
-it
\
-u
$UID
:
$GID
\
-v
"
$BASE_D
"
:/srv
\
-v
"
$BASE_D
/configuration/"
:/etc/aura
\
--tmpfs
/var/log/aura/ autoradio/engine /srv/engine-core.py
--recreate-database
fi
fi
### Create Docker Image from local project ###
### Create Docker Image from local project ###
...
...
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