Skip to content

Commit

Permalink
(test: use {{DATA_HUB}})
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Oct 3, 2024
1 parent bc960b7 commit 293bf79
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions resources/launch_scripts/docker/launch_worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,20 @@ PY_ARGS="$(echo $DOCKER_PY_ARGS | awk -F "#" '{print $2}')"
# Run worker on ewms pilot
set -x

# establish root path
# establish pilot's root path
tmp_rootdir="$(pwd)/pilot-$(uuidgen)"
mkdir $tmp_rootdir
cd $tmp_rootdir
export EWMS_PILOT_DATA_DIR_PARENT_PATH_ON_HOST="$tmp_rootdir"

# TODO - remove, this should go into the pilot w/ {{DATAHUB}}
# TODO - use EWMS_PILOT_EXTERNAL_DIRECTORIES
datahub="$EWMS_PILOT_DATA_DIR_PARENT_PATH_ON_HOST/ewms-pilot-data/data-hub"
mkdir -p "$datahub"
datahub_in_task="/ewms-pilot-data/data-hub"

cp $CI_SKYSCAN_STARTUP_JSON $datahub # TODO - after testing this with {{DATAHUB}}, use EWMS_PILOT_EXTERNAL_DIRECTORIES
cp $CI_SKYSCAN_STARTUP_JSON $datahub

# task image, args, env
export EWMS_PILOT_TASK_IMAGE="$DOCKER_IMAGE_TAG"
export EWMS_PILOT_TASK_ARGS="python -m skymap_scanner.client.reco_icetray --infile {{INFILE}} --outfile {{OUTFILE}} --client-startup-json $datahub_in_task/startup.json"
export EWMS_PILOT_TASK_ARGS="python -m skymap_scanner.client.reco_icetray --infile {{INFILE}} --outfile {{OUTFILE}} --client-startup-json {{DATA_HUB}}/startup.json"
json_var=$(env | grep '^SKYSCAN_' | awk -F= '{printf "\"%s\":\"%s\",", $1, $2}' | sed 's/,$//') # must remove last comma
json_var="{$json_var}"
export EWMS_PILOT_TASK_ENV_JSON="$json_var"
Expand Down

0 comments on commit 293bf79

Please sign in to comment.