-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·42 lines (33 loc) · 1.25 KB
/
test.sh
File metadata and controls
executable file
·42 lines (33 loc) · 1.25 KB
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
#!/usr/bin/env bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
echo $SCRIPTPATH
./build.sh
# Maximum is currently 30g, configurable in your algorithm image settings
# on grand challenge
MEM_LIMIT="32g"
# Do not change any of the parameters to docker run, these are fixed
docker run --rm \
--gpus='"device=2"' \
--memory="${MEM_LIMIT}" \
--memory-swap="${MEM_LIMIT}" \
--network="none" \
--cap-drop="ALL" \
--security-opt="no-new-privileges" \
--shm-size="128m" \
--pids-limit="256" \
-v=$SCRIPTPATH/test:/input/ \
-v=$SCRIPTPATH/output:/output/ \
bondbidhie2023_algorithm
#docker run --rm \s
# -v bondbidhie2023_algorithm-output-$VOLUME_SUFFIX:/output/ \
# python:3.8-slim cat /output/results.json | python -m json.tool
# docker run --rm \
# -v bondbidhie2023_algorithm-output-$VOLUME_SUFFIX:/output/ \
# -v $SCRIPTPATH/test/:/input/ \
# python:3.8-slim python -c "import json, sys; f1 = json.load(open('/output/results.json')); f2 = json.load(open('/input/expected_output.json')); sys.exit(f1 != f2);"
if [ $? -eq 0 ]; then
echo "Tests successfully passed..."
else
echo "Expected output was not found..."
fi
# docker volume rm bondbidhie2023_algorithm-output-$VOLUME_SUFFIX