This repository contains the materials that are used in the Co-simulation tutorial delivered at Wintersim Conference, in 2019.
Install Docker.
Using docker's console, navigate to the root of this repository.
Build the docker image: docker build -t jupyter . This will download all dependencies you need to run the examples.
Note the host's ip address by running: docker-machine ip. Let us denote it by MACHINE_IP
Run the docker container: docker run --name jupyterrun -p 8888:8888 -t jupyter. This will start a container with name jupyterrun of the image tagged with jupyter and will forward any traffic going into port 8888 (in the host machine) to the same port in the virtual machine. Let TOKEN denote the token given.
Open your browser and navigate to http://MACHINE_IP:8888/?token=TOKEN
Explore the examples.
Any changes made in the notebooks affect only the files inside the container. To retrieve them, you need to detach from the jupyterrun container (typing Ctrl+C on docker's console), and use the following command on docker's console:
docker cp jupyterrun:/opt/notebooks/tutorial mytutorial
Which will copy all files under the tutorial folder to the mytutorial folder in the repository.
To terminate and clean up, run the following commands
docker stop jupyterrun
docker rm jupyterrun