-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_train.sh
executable file
·58 lines (50 loc) · 1.9 KB
/
test_train.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
# echo $SCRIPTPATH
. ./build.sh
docker volume create noduledetection-output
time docker run --rm \
--network none \
--gpus all \
--memory=20g \
--shm-size 16G \
-e NVIDIA_VISIBLE_DEVICES=0 \
-v /home/Behrendt//projects/Node21/node21-submit//input_train/:/input/ \
-v /home/Behrendt//projects/Node21/node21-submit/output:/output/ \
noduledetector \
--train >&1 | tee -a log_train.txt
# docker run --rm \
# --network none \
# --gpus 0 \
# --memory=11g \
# --shm-size 8G \
# -e NVIDIA_VISIBLE_DEVICES=0 \
# -v /home/Behrendt//projects/Node21/node21-submit//input_train/:/input/ \
# -v noduledetection-output:/output/ \
# noduledetector \
# --retrain
docker run --rm \
--network none \
--gpus all \
--memory=20g \
--shm-size 16G \
-e NVIDIA_VISIBLE_DEVICES=0 \
-v /home/Behrendt/projects/Node21/node21-submit/output/:/input/ \
-v noduledetection-output:/output/ \
noduledetector \
--retest
# docker run --rm -v noduledetection-output:/output/ python:3.7-slim cat /output/nodules.json | python3 -m json.tool
# echo "inputs"
# docker run --rm -v $SCRIPTPATH/test/:/input/ python:3.7-slim cat /input/expected_output.json | python3 -m json.tool
# docker run --rm \
# --network none \
# --gpus all \
# -v noduledetection-output:/output/ \
# -v $SCRIPTPATH/test/:/input/ \
# python:3.7-slim python3 -c "import json, sys; f1 = json.load(open('/output/nodules.json')); f2 = json.load(open('/input/expected_output.json')); print(f1!=f2); sys.exit(f1 != f2);"
# if [ $? -eq 0 ]; then
# echo "Tests successfully passed..."
# else
# echo "Expected output was not found..."
# fi
docker volume rm noduledetection-output