forked from SiVeGCS/dask_template
30 lines
No EOL
674 B
Bash
30 lines
No EOL
674 B
Bash
#!/bin/bash
|
|
|
|
if [ $# -ne 5 ]; then
|
|
echo "Usage: $0 <ws_dir> <env_archive> <ray_address> <redis_password> <obj_store_memory>"
|
|
exit 1
|
|
fi
|
|
|
|
export WS_DIR=$1
|
|
export ENV_ARCHIVE=$2
|
|
export RAY_ADDRESS=$3
|
|
export REDIS_PASSWORD=$4
|
|
export OBJECT_STORE_MEMORY=$5
|
|
|
|
# printenv | grep 'RAY_ADDRESS\|REDIS_PASSWORD'
|
|
|
|
# module load system/nvidia/ALL.ALL.525.125.06
|
|
|
|
export ENV_PATH=/run/user/$PBS_JOBID/ray_env
|
|
|
|
mkdir -p $ENV_PATH
|
|
tar -xzf $WS_DIR/$ENV_ARCHIVE -C $ENV_PATH
|
|
source $ENV_PATH/bin/activate
|
|
conda-unpack
|
|
|
|
ray start --address=$RAY_ADDRESS \
|
|
--redis-password=$REDIS_PASSWORD \
|
|
--object-store-memory=$OBJECT_STORE_MEMORY \
|
|
--block
|
|
|
|
rm -rf $ENV_PATH |