-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun.sh
executable file
·31 lines (27 loc) · 1.19 KB
/
run.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
#!/bin/bash
while getopts 'o:c:' opt; do
case $opt in
o) OUTPUT="$OPTARG" ;;
c) INPUT="$OPTARG" ;;
*) exit 1 ;;
esac
done
echo "************************"
echo "*** Starting execution ***"
echo "************************"
echo input = "${INPUT}"
echo output = "${OUTPUT}"
# make build
EN_TRAINING=/media/training-datasets/author-profiling/pan16-author-profiling-training-dataset-english-2016-03-26
ES_TRAINING=/media/training-datasets/author-profiling/pan16-author-profiling-training-dataset-spanish-2016-04-25
NL_TRAINING=/media/training-datasets/author-profiling/pan16-author-profiling-training-dataset-dutch-2016-04-25
VOLUMES=" -v $INPUT:/media/input -v $OUTPUT:/media/output -v $EN_TRAINING:/media/en -v $ES_TRAINING:/media/es -v $NL_TRAINING:/media/nl "
VARS=" -e TIRA_INPUT=/media/input -e TIRA_OUTPUT=/media/output "
IMAGE=magic
name=magic
registry=hub.docker.com
make build
echo "[BEGIN DOCKER COMMAND]"
docker run -it --rm=true $VOLUMES $VARS $registry/$name python profiler.py --tira_input /media/input --tira_output /media/output
docker run -it --rm=true $VOLUMES $VARS $registry/$name chown -R 1000:1000 /media/output
echo "[END DOCKER COMMAND]"