Breaking change: Remove '2' from default worker paths. Pulling this change into old installations that still us `cryosparc2_worker` in the path will temporarily break the worker. To fix, run `dev/update_version.sh` followed by `./connect_all.sh`. - new dev/update_versions.sh script to fix your config - use cryosparcm wrapper, which handles alternate CRYOSPARC_HOME correctly
40 lines
995 B
Bash
Executable File
40 lines
995 B
Bash
Executable File
#!/bin/bash
|
|
# Connect all lanes to cryosparc
|
|
|
|
|
|
# Path to cryosparcm binary
|
|
# Defaults to the wrapper script, which validates the host and supports $CRYOSPARC_HOME
|
|
: "${CRYOSPARCM:=/data/project/bio/software/cryoSPARC/v2/scripts/cryosparcm.sh}"
|
|
|
|
if [[ ! -x "$CRYOSPARCM" ]]; then
|
|
echo "ERROR: Unable to find cryosparcm at $CRYOSPARCM" >&2
|
|
exit 1
|
|
fi
|
|
|
|
LANES=("gpu" "gpu-big" "gpu-short" "gpu-rtx2080ti" "cpu-daily")
|
|
|
|
success=1
|
|
for lane in "${LANES[@]}"; do
|
|
cd "$lane"
|
|
WORKER=$(sed -nE 's/.*"worker_bin_path" *: *"([^"]*)".*/\1/p' cluster_info.json)
|
|
if [[ ! -x "$WORKER" ]]; then
|
|
echo "ERROR: Worker $WORKER from lane $lane not found." >&2
|
|
else
|
|
echo "$CRYOSPARCM" cluster connect >&2
|
|
"$CRYOSPARCM" cluster connect
|
|
|
|
if [[ $? != 0 ]]; then
|
|
echo "ERROR connecting $lane" >&2
|
|
success=0
|
|
fi
|
|
echo >&2
|
|
|
|
fi
|
|
cd ..
|
|
done
|
|
|
|
if [[ $success == 0 ]]; then
|
|
echo "Errors occured. See above." >&2
|
|
exit 1
|
|
fi
|