All Projects → mbonvini → ModelicaInAction

mbonvini / ModelicaInAction

Licence: MIT license
Modelica In Action

Programming Languages

Jupyter Notebook
11667 projects
Modelica
51 projects
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to ModelicaInAction

Alpine Ikev2 Vpn
Small Simple Free runing container's IKEv2 VPN base alpine image.
Stars: ✭ 215 (+451.28%)
Mutual labels:  docker-container
LID-DS
LID-DS is an intrusion detection data simulation framework.
Stars: ✭ 32 (-17.95%)
Mutual labels:  docker-container
jenkins-ecs-deployment
Deploy docker containers to AWS ECS/ECR via Jenkins
Stars: ✭ 20 (-48.72%)
Mutual labels:  docker-container
Netdata
Dockerfile for building netdata
Stars: ✭ 223 (+471.79%)
Mutual labels:  docker-container
sampling-methods-numpy
This repository contains implementations of some basic sampling methods in numpy.
Stars: ✭ 48 (+23.08%)
Mutual labels:  ipython-notebook
docker-chromium
Docker container with Chromium desktop and a Web VNC client allowing you to run Chromium on any server you have
Stars: ✭ 64 (+64.1%)
Mutual labels:  docker-container
Aws Containers Task Definitions
Task Definitions for running common applications Amazon ECS
Stars: ✭ 210 (+438.46%)
Mutual labels:  docker-container
play-docker-aws-tutorial
101 tutorial: How to deploy Play application to Amazon Lightsail (AWS) using Docker
Stars: ✭ 25 (-35.9%)
Mutual labels:  docker-container
rk
The remote Jupyter kernel/kernels administration utility
Stars: ✭ 53 (+35.9%)
Mutual labels:  ipython-notebook
React-Jupyter-Viewer
A react component to embed .ipyb notebooks in a blog or something
Stars: ✭ 50 (+28.21%)
Mutual labels:  ipython-notebook
Iotwifi
Raspberry Pi (arm) wifi configuration container. Configure and control wifi connectivity with a JSON based REST api.
Stars: ✭ 236 (+505.13%)
Mutual labels:  docker-container
Spring Boot K8s Hpa
Autoscaling Spring Boot with the Horizontal Pod Autoscaler and custom metrics on Kubernetes
Stars: ✭ 250 (+541.03%)
Mutual labels:  docker-container
docker-php-censor
Containers for PHP Censor CI system
Stars: ✭ 19 (-51.28%)
Mutual labels:  docker-container
Nodejs Microservice Starter
🌱 NodeJS RESTful API Microservice Starter
Stars: ✭ 220 (+464.1%)
Mutual labels:  docker-container
docker-tutorial
2DAW Tutorial de Docker para el desarrollo avanzado de código y despliegue de aplicaciones con distintos ejemplos prácticos. Aprende a usar Docker Files y Docker Compose.
Stars: ✭ 26 (-33.33%)
Mutual labels:  docker-container
Uwsgi Nginx Flask Docker
Docker image with uWSGI and Nginx for Flask applications in Python running in a single container. Optionally with Alpine Linux.
Stars: ✭ 2,607 (+6584.62%)
Mutual labels:  docker-container
docker-collectd
Collectd within a Docker image
Stars: ✭ 59 (+51.28%)
Mutual labels:  docker-container
docker-pivpn
A secure docker container that sets up PiVPN in a virtual environment.
Stars: ✭ 82 (+110.26%)
Mutual labels:  docker-container
alpine-qbittorrent-openvpn
qBittorrent docker container with OpenVPN client running as unprivileged user on alpine linux
Stars: ✭ 230 (+489.74%)
Mutual labels:  docker-container
docker-ps3netsrv
Alpine based docker image for ps3netsrv (with arm compatibility). Built with the latest ps3netsrv binaries from aldostools (built from master), latest = ps3netsrv v20220813, edge = ps3netsrv v20220813
Stars: ✭ 55 (+41.03%)
Mutual labels:  docker-container

Modelica In Action

This repository contains examples that demonstrate how to create, compile and simulate Modelica models using JModelica.org.

Notes

All the make commands mentioned in this guide reference the Makefile located in the root directory of this repository.

Installation

In order to simplify your life the repository contains all the code necessary to create a Docker container that runs JModelica.org. In case you wonder what's a Docker container

Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment (see https://www.docker.com/what-docker for more info).

In this case I created a "recipe", also known as Docker file, that describes how to build a container with installed everything that's needed to work with JModelica.org.

Once created and started, the container and your computer will interact as shown in the following image.

alt tag

Upon start, some folders included in this repository will be shared with the container, in the meantime the container runs an IPython server. The container exposes the port used by the IPython server to your local machine. In this way you can connect to the IPython server in the container with a browser. Once you access the IPython server you can start working with JModelica.org.

The Docker container is based on a so called image (something similar to a snapshot of a virtual machine). To create the image you have two options

  • manually build the image with the command make build-image

  • download the image with the command make download-image

The second option is preferable because it doesn't require you to wait while Docker compiles from source JModelica.org and all its dependencies.

As of November 28 2018, there are two version of the image: 1.0 and 2.0, the latter has installed a more recent version of JModelica as well as Jupyter notebook instead of IPython. To download the version you're interested in, add the VERSION=x.0 to the make rules you invoke, for example to download the image version 2.0 run

make download-image VERSION=2.0

You can verify that the container image has been built (or downloaded) using the command docker images. In my case when I run the command I see

$ docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
modelicainaction/jmodelica   2.0                 7f7f224e3da2        23 hours ago        3.1GB
ubuntu                       18.04               93fd78260bd1        9 days ago          86.2MB
ubuntu                       16.04               f753707788c5        23 months ago       127.2 MB
modelicainaction/jmodelica   1.0                 adcc4c39b0d6        23 months ago       2.7GB

Starting the container

Once the container image has been created we can start it. To start the container run the command make start. Again, you can choose which version to run by specifying the version like make start VERSION=2.0. This command starts the container with installed JModelica.org and an IPython notebook server listening on port 8888. The same port used by the IPython/Jupyter server is exposed by the container and redirected to the localhost. This means that if you open a browser and go to http://127.0.0.1:8888 you should see something like this

alt tag

By default the container is configured to share the following folders

  • modelica - a folder containing the source code of the Modelica models used in the examples

  • ipynotebooks - a folder containing the ipython notebooks with examples

Every Modelica model located in the folder modelica will be immediately visible to JModelica.org. The same is true for the folder ipynotebooks, every notebook it contains will be automatically visible when you open the browser and go to http://127.0.0.1:8888.

You can verify that the container is running with the command docker ps -a

$ docker ps -a
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS              PORTS                      NAMES
639bd33a27fb        modelicainaction/jmodelica:1.0   "sh -c 'ipython noteb"   4 hours ago         Up 4 hours          127.0.0.1:8888->8888/tcp   prickly_mayer

and you can stop and remove the container (not the container image) with the command docker stop 639bd33a27fb && docker rm 639bd33a27fb where 639bd33a27fb is the container id.

NOTES

  • Version 2.0 uses Jupyter instead of IPython notebooks, and it requires to prompt a password when you connect to the server from your browser. The password is modelicainaction.
  • I've seen some warnings and minor problems when running the examples in the most recent version 2.0. Unfortunately JModelica.org documentation doesn't seem to be up to date and I can't do much about it. I was still able to run simulations, but as usual use it at your own risk!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].