Skip to content

Commit

Permalink
Merge cb13dbe into 6ec50ef
Browse files Browse the repository at this point in the history
  • Loading branch information
awicenec committed May 9, 2023
2 parents 6ec50ef + cb13dbe commit 8345107
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 4 deletions.
9 changes: 8 additions & 1 deletion daliuge-engine/run_engine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DOCKER_OPTS="\
--shm-size=2g --ipc=shareable \
--rm \
$([[ $(nvidia-docker version) ]] && echo '--gpus=all' || echo '') \
$([[ $(command -v nvidia-docker version) ]] && echo '--gpus=all' || echo '') \
--name daliuge-engine \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 5555:5555 -p 6666:6666 \
Expand Down Expand Up @@ -71,6 +71,13 @@ case "$1" in
exit 0;;
"local")
common_prep
res="$(dlg nm -h| grep -c 'Unknown command')"
if [[ $res == 1 ]]
then
echo "dlg command could not be found!"
echo "Please install daliuge-engine."
exit
fi
echo "Starting managers locally in background.."
dlg nm -vvd -H 0.0.0.0 --dlg-path=$DLG_ROOT --dlm-cleanup-period=10
dlg dim -vvd -H 0.0.0.0 -N localhost
Expand Down
1 change: 1 addition & 0 deletions daliuge-engine/stop_engine.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/env bash
# This utlity script stops a locally running docker-engine container
case "$1" in
"docker")
Expand Down
21 changes: 20 additions & 1 deletion daliuge-translator/run_translator.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/env bash
case "$1" in
"dep")
VCS_TAG=`git describe --tags --abbrev=0|sed s/v//`
Expand All @@ -14,7 +15,25 @@ case "$1" in
echo "Running Translator development version in foreground..."
docker run --volume $PWD/dlg/dropmake:/dlg/lib/python3.8/site-packages/dlg/dropmake --name daliuge-translator --rm -t -p 8084:8084 icrar/daliuge-translator:${VCS_TAG}
exit 0;;
"local")
DLG_ROOT="${DLG_ROOT:-$HOME/dlg}"
res="$(dlg lgweb -h| grep -c 'Unknown command')"
if [[ $res == 1 ]]
then
echo "dlg lgweb command could not be found!"
echo "Please install daliuge-translator."
exit
fi
echo "Starting translator locally in foreground.."
dlg lgweb -vv -d /tmp -t /tmp > $DLG_ROOT/logs/dlgLGWEB.log 2>&1 &
mkdir -p $DLG_ROOT/pid
echo $! > $DLG_ROOT/pid/dlgLGWEB.pid
echo
echo "Use any of the following URLs to access the DIM:"
python -c "from dlg.utils import get_local_ip_addr; print([f'http://{addr}:8084' for addr,name in get_local_ip_addr() if not name.startswith('docker')])"
echo "Log file can be found in ${DLG_ROOT}/log/dlgLGWEB.log"
;;
*)
echo "Usage run_translator.sh <dep|dev|casa>"
echo "Usage run_translator.sh <dep|dev|casa|local>"
exit 0;;
esac
22 changes: 20 additions & 2 deletions daliuge-translator/stop_translator.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# This utlity script stops a locally running docker-engine container
docker stop daliuge-translator
#!/bin/env bash
# This utlity script stops a locally running translator
MYPID=$$
echo $MYPID
case "$1" in
"docker")
docker stop daliuge-translator;;
"local")
DLG_ROOT="${DLG_ROOT:-$HOME/dlg}"
echo "Stopping translator.."
if [[ $DLG_ROOT/pid/dlgLGWEB.pid ]]
then
cat $DLG_ROOT/pid/dlgLGWEB.pid | xargs kill -HUP
fi
;;
*)
echo "Usage: stop_translator.sh <docker|local>"
echo " default: docker"
docker stop daliuge-translator;;
esac

0 comments on commit 8345107

Please sign in to comment.