Init
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# export CUDA_VISIBLE_DEVICES=4,5,6,7
|
||||
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
|
||||
NUM_GPUS=$(echo $CUDA_VISIBLE_DEVICES | tr ',' '\n' | wc -l)
|
||||
|
||||
# print current time
|
||||
echo "[current time: $(date +'%Y-%m-%d %H:%M:%S')]"
|
||||
|
||||
code_dir="/path/to/wall-x"
|
||||
config_path="/path/to/wall-x/workspace/lerobot_example"
|
||||
|
||||
# Use a fixed port instead of a random one
|
||||
export PORT=$((21000 + $RANDOM % 30000))
|
||||
|
||||
MASTER_PORT=10239 # use 5 digits ports
|
||||
|
||||
export LAUNCHER="accelerate launch --num_processes=$NUM_GPUS --main_process_port=$PORT"
|
||||
|
||||
export SCRIPT="${code_dir}/train_qact.py"
|
||||
export SCRIPT_ARGS="--config ${config_path}/config_qact.yml --seed $MASTER_PORT"
|
||||
|
||||
echo "Running command: $LAUNCHER $SCRIPT $SCRIPT_ARGS"
|
||||
|
||||
$LAUNCHER $SCRIPT $SCRIPT_ARGS
|
||||
Reference in New Issue
Block a user