24 lines
897 B
Bash
Executable File
24 lines
897 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Updates the cluster scripts based on the currently loaded cuda, gcc, and CRYOSPARC_HOME settings
|
|
|
|
shopt -s failglob
|
|
set -euo pipefail
|
|
|
|
CRYOSPARC_HOME="${CRYOSPARC_HOME:-/data/user/$USER/cryosparc}"
|
|
if [[ ! -d "$CRYOSPARC_HOME" ]]; then
|
|
echo "$CRYOSPARC_HOME not found. Set the CRYOSPARC_HOME variable."
|
|
exit 1
|
|
fi
|
|
|
|
# support both cryosparc2_master and cryosparc_master directories
|
|
CRYOSPARC_WORKER=$(ls "$CRYOSPARC_HOME"/cryosparc*_worker/bin/cryosparcw | head -1)
|
|
|
|
#echo "Cuda version: ${CUDA_VERSION?Please load the correct cuda module}"
|
|
#echo "GCC version: ${GCC_VERSION?Please load the correct gcc version}"
|
|
echo "Worker path: ${CRYOSPARC_WORKER}"
|
|
|
|
#sed -ri 's#cuda/[0-9.]+#cuda/'$CUDA_VERSION'#' */cluster_script.sh
|
|
#sed -ri 's#gcc/[0-9.]+#gcc/'$GCC_VERSION'#' */cluster_script.sh
|
|
sed -ri 's#worker_bin_path.*#worker_bin_path" : "'$CRYOSPARC_WORKER'",#' */cluster_info.json
|