-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_java_std_interface.sh
More file actions
executable file
·46 lines (32 loc) · 1.18 KB
/
run_java_std_interface.sh
File metadata and controls
executable file
·46 lines (32 loc) · 1.18 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
43
44
45
46
#!/bin/bash
DIR="$(dirname "$(realpath "$0")")"
cd "$DIR"
if ! ./check_run.sh
then
exit 1
fi
####################################################################################################
FILE=java/target/Java-1.0-SNAPSHOT-bin.jar
if [ ! -f "$FILE" ]; then
cd ./java
if ! (mvn clean && mvn package)
then
exit 1
fi
fi
####################################################################################################
cd "$DIR"
####################################################################################################
echo 'Sourcing conda shell.bash hook'
eval "$(conda shell.bash hook)"
####################################################################################################
backend=${1:-cpu}
if [ $backend = 'cpu' ]; then
echo 'Activating conda environment with CPU Backend'
conda activate model-benchmark-v2
else
echo 'Activating conda environment with GPU Backend'
conda activate model-benchmark-v2.1
fi
####################################################################################################
java -jar "$FILE" STDIN "$(pwd)"/config "$(pwd)"/data/dataset.json "$(pwd)"/data/results/"$backend" "$(pwd)"/python/stdin-interface.py