Claudio Gomes e5b9450b6c slides improvements | 4 years ago | |
---|---|---|
cosimlibrary | 4 years ago | |
fmus | 4 years ago | |
slides | 4 years ago | |
solutions | 4 years ago | |
theory | 4 years ago | |
tutorial | 4 years ago | |
.gitignore | 4 years ago | |
Dockerfile | 4 years ago | |
README.md | 4 years ago | |
notebook.ps1 | 5 years ago |
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. You might need root access.
If you are running docker on windows, you might need to note the host's ip address by running:
docker-machine ip
Let us denote it by MACHINE_IP
. If this step fails, you might need to run the next step to start the docker machine first.
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.
docker stop jupyterrun
docker rm jupyterrun
If you want to preserve the virtual machine that is used to run the materials in this repository (for example, you may want to later load it from a USB stick), follow these instructions:
docker save jupyter | gzip > jupyter.tar.gz
jupyter.tar.gz
wherever you want.The VM exported with the above instructions can be loaded as follows:
jupyter.tar.gz
file.docker load < jupyter.tar.gz