File tree Expand file tree Collapse file tree 3 files changed +29
-6
lines changed Expand file tree Collapse file tree 3 files changed +29
-6
lines changed Original file line number Diff line number Diff line change 23
23
run : |
24
24
docker -v
25
25
docker images
26
- - name : Run the Docker image
26
+ - name : Run the Docker image with the falling cube
27
+ run : |
28
+ ./run.sh -d 20 -c demo1
29
+ - name : Run the Docker image with a worm
27
30
run : |
28
31
./run.sh
29
32
- name : Info on generated files
Original file line number Diff line number Diff line change @@ -4,3 +4,6 @@ output/C2*
4
4
/output /siminfo.py
5
5
/output /wor *
6
6
/output /Sibernetic_ *
7
+ /output /test *
8
+ /output /box
9
+ /output /swim *
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ version=$( < VERSION) # Read version of Dockerfile from file VERSION
4
+
5
+
3
6
# from: https://unix.stackexchange.com/a/129401
4
- while getopts " :d:p :" opt; do
5
- case $ opt in
7
+ while getopts " :d:c :" opt; do
8
+ case " ${ opt} " in
6
9
d) duration=" $OPTARG "
7
10
;;
8
- p) p_out =" $OPTARG "
11
+ c) configuration =" $OPTARG "
9
12
;;
10
- \? ) echo " Invalid option -$OPTARG " >&2
13
+ * ) echo " Usage: $0 [-d duration] [-c configuration]" >&2
14
+ exit 1
11
15
;;
12
16
esac
13
17
done
14
18
15
19
OW_OUT_DIR=/home/ow/shared
16
20
HOST_OUT_DIR=$PWD
17
21
18
- version=$( < VERSION) # Read version of Dockerfile from file VERSION
19
22
20
23
xhost +
21
24
@@ -26,10 +29,24 @@ else #Duration is set, use it.
26
29
DURATION_PART=" -e DURATION=$duration "
27
30
fi
28
31
32
+ echo 888
33
+ if [ -z " $configuration " ]
34
+ then # configuration is not set, don't use it
35
+ CONFIGURATION_PART=" "
36
+ else # Configuration is set, use it.
37
+ CONFIGURATION_PART=" -e CONFIGURATION=$configuration "
38
+ fi
39
+
40
+ echo 77
41
+
42
+ echo " Running Docker container for OpenWorm v${version} , configuration: ${configuration} , duration: ${duration} "
43
+
44
+
29
45
docker run -d \
30
46
--name openworm_$version \
31
47
--device=/dev/dri:/dev/dri \
32
48
-e DISPLAY=$DISPLAY \
49
+ $CONFIGURATION_PART \
33
50
$DURATION_PART \
34
51
-e OW_OUT_DIR=$OW_OUT_DIR \
35
52
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
You can’t perform that action at this time.
0 commit comments