-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_filter.sh
30 lines (28 loc) · 1.04 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
#!/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 \
--name $CONTAINER_NAME \
-v /data/xiao/torch_filter/soft_robot:/tf \
radiusaiinc/torch_filter:$IMAGE_TAG \
/bin/bash -c "python train.py --config ${config_file}"
echo "*********************Starting tensorboard at localhost:8093*********************"
logdir="/tf/experiments/$(basename $config_file .yaml)/summaries"
docker run --name "$CONTAINER_NAME-tensorboard" \
--gpus=all \
--network host \
-d \
--env-file conf.sh \
-v /data/xiao/torch_filter/soft_robot:/tf \
radiusaiinc/torch_filter:$IMAGE_TAG \
/bin/bash -c "tensorboard --logdir $logdir --host 0.0.0.0 --port 8093 --reload_multifile=true"
fi