Skip to content

Latest commit

 

History

History
179 lines (117 loc) · 12.4 KB

README.md

File metadata and controls

179 lines (117 loc) · 12.4 KB

Docker image for running SysML v2

Create a docker image for running SysML v2 Release in Jupyter.

The setup is taken from the Jupyter installation.

In addition, an API Server is also started and everything published in Jupyter will be pushed into this server.

Remote Services

You can try this out on Binder, via DockerHub or just view the notebooks at nbviewer.

Binder

You can run this on Binder but it will only run the SysMLv2-based Jupyter server, not the API server.

Latest version: Binder

See below for specific release links.

You can also view notebooks via nbviewer and from there it's possible to start up Binder.

Dockerhub

Docker images are also available. These are only of the Jupyter installation not the API server.

See below for specific pull statements.

nbviewer

Repo can also be viewed using nbviewer.

See below for specific release links.

Dedicated Server

Thanks to Tim Weilkiens, there is now a dedicated server running the latest version of this repo.

Overview

nbviewer binder docker hub
docker pull weilkiti/sysmlv2-jupyter:2022-10
docker pull weilkiti/sysmlv2-jupyter:2022-09
docker pull weilkiti/sysmlv2-jupyter:2022-08
2022-07 2022-07 docker pull gorenje/sysmlv2-jupyter:2022-07
2022-06 2022-06 docker pull gorenje/sysmlv2-jupyter:2022-06
2022-05 2022-05 docker pull gorenje/sysmlv2-jupyter:2022-05
2022-04 2022-04 docker pull gorenje/sysmlv2-jupyter:2022-04
2022-03 2022-03 docker pull gorenje/sysmlv2-jupyter:2022-03
2022-02 2022-02 docker pull gorenje/sysmlv2-jupyter:2022-02
2022-01 2022-01 docker pull gorenje/sysmlv2-jupyter:2022-01
2021-12 2021-12 docker pull gorenje/sysmlv2-jupyter:2021-12
2021-11 2021-11 docker pull gorenje/sysmlv2-jupyter:2021-11
2021-10 2021-10 docker pull gorenje/sysmlv2-jupyter:2021-10
2021-09 2021-09 docker pull gorenje/sysmlv2-jupyter:2021-09
2021-08.1 2021-08.1 docker pull gorenje/sysmlv2-jupyter:2021-08.1
2021-08 2021-08 docker pull gorenje/sysmlv2-jupyter:2021-08
2021-06 2021-06 docker pull gorenje/sysmlv2-jupyter:2021-06
2021-05 2021-05 docker pull gorenje/sysmlv2-jupyter:2021-05
2021-04 2021-04 docker pull gorenje/sysmlv2-jupyter:2021-04
2021-03 2021-03 docker pull gorenje/sysmlv2-jupyter:2021-03
2021-02 2021-02 docker pull gorenje/sysmlv2-jupyter:2021-02
2021-01 2021-01 docker pull gorenje/sysmlv2-jupyter:2021-01
2020-12 2020-12 docker pull gorenje/sysmlv2-jupyter:2020-12
2020-11 2020-11 docker pull gorenje/sysmlv2-jupyter:2020-11
2020-10 2020-10 docker pull gorenje/sysmlv2-jupyter:2020-10

Local Usage

Be aware, building the docker images will take a while since all the software packages will be retrieved. Everything is built and run locally.

Prerequistes

Everything else is installed by the build process.

Makefile

To start up the SysML-Jupyter server, the postgres server and the API server:

make spin-up

Then point your browser first to http://localhost:9000/docs/ - this will setup the database for the API server. Once this displays a page, then point your browswer to the Jupyter page. This is on http://localhost:8888, don't use the hostname sysmljupyter, that's internal to docker.

    To access the notebook, open this file in a browser:
        file:///root/.local/share/jupyter/runtime/nbserver-1-open.html
    Or copy and paste one of these URLs:
        http://sysmljupyter:8888/?token=392e5b7c0e8cde28d6f988862bc7ad81ba6c517e31b63520
     or http://127.0.0.1:8888/?token=392e5b7c0e8cde28d6f988862bc7ad81ba6c517e31b63520

The token is unique for each start of the container.

NOTE: If localhost does not work in the URLs, try 127.0.0.1 instead.

Using Docker

If you want to do this using docker only, i.e. no makefile, then have a look at the Makefile. Basically it's something along the lines of:

docker build -t sysml.jupyter -f Dockerfile.jupyter .
docker build -t sysml.api     -f Dockerfile.api     .
docker network create thenetwork
docker volume create postgresdbserver
docker-compose -f docker-compose.yml up

That is the same as doing make spin-up.

Other Docker Builds

The Makefile also does the following builds for local usage:

  1. make build-mybinder will build the docker image that is used with mybinder. This image can then be run locally using make run-mybinder.

  2. make build-hub will build the docker hub image. Running this image can be done with make run-hub.

These also work for each release that is supported by this repo.

Checking out other releases

Each release has it's own branch, so for example to test the SysML v2 Release 2020-12, do the following:

git checkout release-2020-12
make run-hub

That will locally start DockerHub Jupyter image with the 2020-12 release.

Production Use?

Don't.

This isn't designed for production use, this is for local or trusted use only.

Example Notebooks

There are a few example notebooks included in the image, their usefulness might vary according to your experience level.

Creating Your Own Notebooks

There is a "mydata" folder that you can create your own notebooks in. It is tied to your local file system, and thus will persist over time.

Inspiration

Building a new Release

When a new release tag becomes available, the following things need doing:

(Since I do this once a month, I thought I might write this up - please ignore)

  1. Ensure there is a corresponding API Server release.
  2. On the main branch, follow this commit to update all dockerfiles & Makefile for the new release (in this case 2021-03). Important is also the addition of the github action for generating a docker image.
  3. Run make build to check that all dockerfiles build locally. Make sure that Docker is running locally.
  4. In a terminal window, run make spin-up to start a Jupyter server locally.
  5. In another termainal window, run make update-testsuite to update all the test notebooks in the repository. This also retrieves the notebooks from the Docker images and, in the end, there is a commit similar to this one.
  6. Create a new branch for the release, something like release-2021-03 ain't bad 😃. On that branch, remove all github actions so that only the one for the branch is left, i.e. this commit.
  7. Push main and the new branch to github.
  8. Done.

Licensing

Both SysMLv2 API Server and SysMLv2 Release are licensed under the LGPL and this continues to be the case.

This project does not make any changes to the existing licensing of the referenced projects.

This project is also licensed under the LGPL.