forked from OpenGVLab/InternVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
29 lines (27 loc) · 743 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
export MASTER_PORT=$((12000 + $RANDOM % 20000))
export OMP_NUM_THREADS=1
echo "PYTHONPATH: ${PYTHONPATH}"
which_python=$(which python)
echo "which python: ${which_python}"
export PYTHONPATH=${PYTHONPATH}:${which_python}
export PYTHONPATH=${PYTHONPATH}:.
echo "PYTHONPATH: ${PYTHONPATH}"
JOB_NAME='S14'
OUTPUT_DIR="$(dirname $0)/$JOB_NAME"
LOG_DIR="./logs/${JOB_NAME}"
PARTITION='video'
NNODE=2
NUM_GPUS=8
NUM_CPU=128
srun -p ${PARTITION} \
-n${NNODE} \
--gres=gpu:${NUM_GPUS} \
--ntasks-per-node=1 \
--cpus-per-task=${NUM_CPU} \
bash torchrun.sh \
--nnodes=${NNODE} \
--nproc_per_node=${NUM_GPUS} \
--rdzv_backend=c10d \
tasks_clip/pretrain.py \
$(dirname $0)/config.py \
output_dir ${OUTPUT_DIR}