#!/bin/bash # Set failfast set -e set -o pipefail # Start condor daemons condor_master # Make directory for standardized Python location (if it doesn't exist) PY_BIN_DIR=/home/ssa/bin mkdir -p $PY_BIN_DIR chown root:vlapipe $PY_BIN_DIR chmod 775 $PY_BIN_DIR # Add symbolic link to standardized Python install location (if it doesn't already exist) ls $PY_BIN_DIR/python3.8 || ln -s "$(which python3)" $PY_BIN_DIR/python3.8 WORKFLOW_DIR=/lustre/aoc/cluster/pipeline/"$CAPO_PROFILE"/workspaces/sbin # Make directory where workflow executables will live (if it doesn't exist) mkdir -p "$WORKFLOW_DIR" SPOOL_DIR=/lustre/aoc/cluster/pipeline/"$CAPO_PROFILE"/workspaces/spool QA_DIR=/lustre/aoc/cluster/pipeline/"$CAPO_PROFILE"/workspaces/qa2 WEBLOG_DIR=/lustre/aoc/cluster/pipeline/"$CAPO_PROFILE"/workspaces/cache IMAGE_QA_DIR=/lustre/aoc/cluster/pipeline/"$CAPO_PROFILE"/workspaces/image-qa mkdir -p "$SPOOL_DIR" mkdir -p "$QA_DIR" mkdir -p "$WEBLOG_DIR" mkdir -p "$WEBLOG_DIR/weblog" mkdir -p "$IMAGE_QA_DIR" # Copy wf_framework shell scripts to workflow dir cp /packages/apps/cli/executables/wf_framework/sh/framework.sh "$WORKFLOW_DIR" cp -R /packages/apps/cli/executables/wf_framework/casa_requirements/.matplotlib "$WORKFLOW_DIR" # Make the locations accessible with vlapipe chown root:vlapipe "$WORKFLOW_DIR" chown root:vlapipe "$WORKFLOW_DIR"/* chown vlapipe:vlapipe "$SPOOL_DIR" chown vlapipe:vlapipe "$QA_DIR" chown -R vlapipe:vlapipe "$WEBLOG_DIR" chown vlapipe:vlapipe "$IMAGE_QA_DIR" chmod 777 "$WORKFLOW_DIR" chmod 777 "$WORKFLOW_DIR"/* su vlapipe -c "/code/bin/boot-workflow.sh"