Skip to content

Commit

Permalink
reorganize deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
ruokolt committed May 16, 2024
1 parent 9235c41 commit b0ebf96
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions bin/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ MPLCONFIGDIR="/tmp"
SPEECH2TEXT_MEM="12G"
SPEECH2TEXT_CPUS_PER_TASK="6"


# --------------------------------------------------
# Deploy as an Open OnDemand app
# Deploy as a module

SCRIPT="$SCRIPT_DIR"/deploy-data/ood/template/script.sh
SCRIPT="$SCRIPT_DIR"/deploy-data/module/module.lua

sed -i "s|<VERSION>|$VERSION|g" $SCRIPT
sed -i "s|<SPEECH2TEXT>|$SPEECH2TEXT|g" $SCRIPT
Expand All @@ -48,14 +47,13 @@ sed -i "s|<MPLCONFIGDIR>|$MPLCONFIGDIR|g" $SCRIPT
sed -i "s|<SPEECH2TEXT_MEM>|$SPEECH2TEXT_MEM|g" $SCRIPT
sed -i "s|<SPEECH2TEXT_CPUS_PER_TASK>|$SPEECH2TEXT_CPUS_PER_TASK|g" $SCRIPT

# Copy the Open OnDemand scripts to the system deployment location
# https://osc.github.io/ood-documentation/release-1.8/app-development/tutorials-interactive-apps/add-jupyter/deploy.html
sudo cp -r "$SCRIPT_DIR"/deploy-data/ood/ /var/www/ood/apps/sys/speech2text # FIXME: wrong path
# Copy
cp "$SCRIPT" /appl/manual_installations/modules/speech2text/"$VERSION".lua

# --------------------------------------------------
# Deploy as a module
# Deploy as an Open OnDemand app

SCRIPT="$SCRIPT_DIR"/deploy-data/module/module.lua
SCRIPT="$SCRIPT_DIR"/deploy-data/ood/template/script.sh

sed -i "s|<VERSION>|$VERSION|g" $SCRIPT
sed -i "s|<SPEECH2TEXT>|$SPEECH2TEXT|g" $SCRIPT
Expand All @@ -69,9 +67,6 @@ sed -i "s|<MPLCONFIGDIR>|$MPLCONFIGDIR|g" $SCRIPT
sed -i "s|<SPEECH2TEXT_MEM>|$SPEECH2TEXT_MEM|g" $SCRIPT
sed -i "s|<SPEECH2TEXT_CPUS_PER_TASK>|$SPEECH2TEXT_CPUS_PER_TASK|g" $SCRIPT

# Copy
cp "$SCRIPT" /appl/manual_installations/modules/speech2text/"$VERSION".lua

# Deploy to Github for ondemand installation
REPO_URL="https://github.com/AaltoSciComp/speech2text-ood-ansible.git"
TEMP_DIR=$(mktemp -d)
Expand Down

0 comments on commit b0ebf96

Please sign in to comment.