Claudio Gomes 6 лет назад
Родитель
Сommit
1e46b46fbc

+ 15 - 0
Dockerfile

@@ -0,0 +1,15 @@
+# Use Anaconda as base container
+FROM continuumio/anaconda3:latest
+
+# Install Jupyter
+RUN /opt/conda/bin/conda install jupyter -y --quiet
+
+# Copy local examples to the remote notebooks
+RUN mkdir /opt/notebooks
+COPY examples /opt/notebooks
+
+# Port
+EXPOSE 8888
+
+# Run Jupyter Notebook
+CMD ["/opt/conda/bin/jupyter", "notebook", "--notebook-dir=/opt/notebooks", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]

+ 18 - 0
README.md

@@ -2,3 +2,21 @@
 
 This repository contains the materials that are used in the Co-simulation tutorial delivered at Wintersim Conference, in 2019.
 
+# Running the Examples
+
+The best way to run the examples is to use [Docker](https://www.docker.com/).
+
+1. Install docker.
+1. Using docker's console, navigate to the root of this repository.
+1. Build the docker image: `docker build -t jupyter .` This will download all dependencies you need to run the examples.
+1. Note the host's ip address by running: `docker-machine ip`. Let us denote it by `MACHINE_IP`
+1. Run the docker container: `docker run -p 8888:8888 jupyter`. This will start a container 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.
+1. Open your browser and navigate to `http://MACHINE_IP:8888/?token=TOKEN`
+1. Explore the examples.
+1. Go back to docker's console, and exit the running container by typing `Ctrl+C`. 
+1. List the running containers: `docker container ls` . If there are running containers, note their ID and stop them using: `docker stop CONTAINERID`
+
+
+
+Any changes made in the notebooks are not permanent. You have to save them to your computer.
+

Разница между файлами не показана из-за своего большого размера
+ 318 - 0
examples/Example1_CruiseController/.ipynb_checkpoints/Example1_CruiseController-checkpoint.ipynb


Разница между файлами не показана из-за своего большого размера
+ 318 - 0
examples/Example1_CruiseController/Example1_CruiseController.ipynb


BIN
examples/Example1_CruiseController/car_example.pdf


Разница между файлами не показана из-за своего большого размера
+ 0 - 292
examples/cruise_controller/.ipynb_checkpoints/cruise_controller-checkpoint.ipynb


Разница между файлами не показана из-за своего большого размера
+ 0 - 296
examples/cruise_controller/cruise_controller.ipynb


Разница между файлами не показана из-за своего большого размера
+ 352 - 0
examples/mass_spring_damper/.ipynb_checkpoints/double_mass_spring_damper-checkpoint.ipynb


Разница между файлами не показана из-за своего большого размера
+ 242 - 0
examples/mass_spring_damper/.ipynb_checkpoints/mass_spring_damper-checkpoint.ipynb


BIN
examples/mass_spring_damper/double_msd_example_trace.pdf


BIN
examples/mass_spring_damper/fmusdk/fmu20/bin/win32/fmusim_cs.exe


BIN
examples/mass_spring_damper/fmusdk/fmu20/fmu/cs/win32/bouncingBall.fmu


BIN
examples/mass_spring_damper/fmusdk/fmu20/fmu/cs/win32/dq.fmu


BIN
examples/mass_spring_damper/fmusdk/fmu20/fmu/cs/win32/inc.fmu


BIN
examples/mass_spring_damper/fmusdk/fmu20/fmu/cs/win32/values.fmu


BIN
examples/mass_spring_damper/fmusdk/fmu20/fmu/cs/win32/vanDerPol.fmu


BIN
examples/mass_spring_damper/msd_example.pdf