Scripts to create a Docker container that would run a netlogo experiment starting from an xml file. This is coming from a simulation of organized crime. Thus, the OC name that will appear in several places - substitute your own lab(el) for labss(OC). Use with caution (it will access your .ssh keys quite liberally).
- Install and start (
sudo service docker start
) on centos) Docker - put ssh keys on the machine so that it can fetch the release from the git.
- create the working directory:
~/commondisk
- create (or use) a working release with its tag (ex. v0.3)
- start from the git base directory
- prepare an experiment in the form of an xml file
- the git base should be linked as ~/OC
from the netlogo-docker directory
cd netlogo-docker/
docker build --tag=labss/netlogo-base .
from the base directory
cd ..
docker build --tag=labss/oc --build-arg SSH_KEY="$(cat ~/.ssh/id_rsa)" --build-arg OC_VERSION='v0.3' .
docker run --entrypoint "/bin/bash" -v ~/commondisk:/extdisk -it oc
Copy the content of the skeleton on the common disk, then substitute the file exp.xml
with your own. Then call the docker run command.
cp ~/OC/docker/extdisk-skeleton/* ~/commondisk
docker run -v ~/commondisk:/extdisk -d labss/oc
It will run in the container, dumping the results in the commondisk.
docker exec -it `docker ps -l -q` /bin/bash
docker ps
to retrieve the _ID_
, then docker exec -it _ID_ /bin/bash
docker ps --filter "status=exited" | grep 'weeks ago' | awk '{print $1}' | xargs --no-run-if-empty docker rm
docker push labss/protonoc
sudo rstudio-server stop
python -m SimpleHTTPServer