-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_filter.sh
32 lines (30 loc) · 1.07 KB
/
run_filter.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
30
31
32
#!/usr/bin/env bash
source conf.sh
if [[ -z $IMAGE_TAG ]]
then
echo "No docker tag provided. Cannot run docker image."
else
echo "Warning: Removing containers with the prefix $CONTAINER_NAME* "
docker rm -f $CONTAINER_NAME "$CONTAINER_NAME-tensorboard"
echo "*********************Starting train_or_test.py script.*********************"
config_file=$1
docker run --gpus all \
-d \
--env-file conf.sh \
--shm-size 8G \
--name $CONTAINER_NAME \
-v /home/data/datasets:/tf/datasets \
-v /home/Diff-control/Diff-control:/tf \
irl/diffusion:$IMAGE_TAG \
/bin/bash -c "python train.py --config ${config_file}"
echo "*********************Starting tensorboard at localhost:7071*********************"
logdir="/tf/experiments/$(basename $config_file .yaml)/summaries"
docker run --name "$CONTAINER_NAME-tensorboard" \
--gpus=all \
--network host \
-d \
--env-file conf.sh \
-v /home/Diff-control/Diff-control:/tf \
irl/diffusion:$IMAGE_TAG \
/bin/bash -c "tensorboard --logdir $logdir --host 0.0.0.0 --port 8001 --reload_multifile=true"
fi