-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from openworm/development
Merge for 0.8
- Loading branch information
Showing
8 changed files
with
117 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
output/C2* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
docker build -t "openworm/openworm:0.7" . | ||
docker build -t "openworm/openworm:0.8" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The output produced after running simulations in the Docker container will be saved here (in your native filesystem). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,46 @@ | ||
#!/bin/bash | ||
|
||
#from: https://unix.stackexchange.com/a/129401 | ||
while getopts ":d:p:" opt; do | ||
case $opt in | ||
d) duration="$OPTARG" | ||
;; | ||
p) p_out="$OPTARG" | ||
;; | ||
\?) echo "Invalid option -$OPTARG" >&2 | ||
;; | ||
esac | ||
done | ||
|
||
OW_OUT_DIR=/home/ow/shared | ||
HOST_OUT_DIR=$PWD | ||
|
||
xhost + | ||
|
||
docker run -d \ | ||
--name openworm \ | ||
--device=/dev/dri:/dev/dri \ | ||
-e DISPLAY=$DISPLAY \ | ||
-e OW_OUT_DIR=$OW_OUT_DIR \ | ||
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \ | ||
--privileged \ | ||
-v $HOST_OUT_DIR:$OW_OUT_DIR:rw \ | ||
openworm/openworm:0.7 \ | ||
python master_openworm.py | ||
if [ -z "$duration" ] | ||
then #duration is not set, don't use it | ||
docker run -d \ | ||
--name openworm \ | ||
--device=/dev/dri:/dev/dri \ | ||
-e DISPLAY=$DISPLAY \ | ||
-e OW_OUT_DIR=$OW_OUT_DIR \ | ||
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \ | ||
--privileged \ | ||
-v $HOST_OUT_DIR:$OW_OUT_DIR:rw \ | ||
openworm/openworm:0.8 \ | ||
bash -c "DISPLAY=:44 python master_openworm.py" | ||
else #Duration is set, use it. | ||
docker run -d \ | ||
--name openworm \ | ||
--device=/dev/dri:/dev/dri \ | ||
-e DISPLAY=$DISPLAY \ | ||
-e DURATION=$duration \ | ||
-e OW_OUT_DIR=$OW_OUT_DIR \ | ||
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \ | ||
--privileged \ | ||
-v $HOST_OUT_DIR:$OW_OUT_DIR:rw \ | ||
openworm/openworm:0.8 \ | ||
bash -c "DISPLAY=:44 python master_openworm.py" | ||
fi | ||
|
||
docker logs -f openworm |