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.
Because Free & Fair is using SysMLv2 as part of active R&D and needs an up-to-date Docker container, we will be updating this image for new releases of the SysMLv2 Pilot Implementation as we find it necessary; we are not, however, committed to updating it for every SysMLv2 release in a prompt fashion. Images will be pushed to Free & Fair's DockerHub.
I no longer actively maintain this repository, all my apologises to those frustrated by that. I have no active interest in SysMLv2 and hence doing this for free was counterproductive for me.
Instead I now actively work with Node-RED which provides a UML-like visual programming interface for (I)IoT development. For those using SysMLv2, Node-RED provides a similar visual interface but with the advantage of code being visual so that the visuals become the code. I have worked on a Flow2UML plugin for Node-RED to convert flow based code to UML diagrams. This highlights the similarities between the two.
You can try this out on Binder, via DockerHub or just view the notebooks at nbviewer.
You can run this on Binder but it will only run the SysMLv2-based Jupyter server, not the API server.
See below for specific release links.
You can also view notebooks via nbviewer and from there it's possible to start up Binder.
Images are also available on DockerHub. These are only of the Jupyter installation, not the API server; they use the public API server, https://sysml2.intercax.com:9000/, for all API server requests.
See below for specific pull statements.
Repo can also be viewed using nbviewer.
See below for specific release links.
Thanks to Tim Weilkiens, there is now a dedicated server running the latest version of this repo.
nbviewer | binder | docker hub |
---|---|---|
2023-02 | 2023-02 | docker pull gorenje/sysmlv2-jupyter:2023-02 |
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 |
Be aware, building the docker images will take a while since all the software packages will be retrieved. Everything is built and run locally.
Everything else is installed by the build process.
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.
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
.
The Makefile also does the following builds for local usage:
-
make build-mybinder
will build the docker image that is used with mybinder. This image can then be run locally usingmake run-mybinder
. -
make build-hub
will build the docker hub image. Running this image can be done withmake run-hub
. -
make build-api DB_SERVER_URL=<server url> DB_USER=<username in your db> DB_PASSWORD=<your password>
builds the api server for the defined database server. -
make build-jupyter SYSML_API_SERVER=<your API server>
builds the jupyter container image for your api server instance. -
make build-latest
builds the api server and jupyter server as defined above and labels it as latest. The aformentioned build arguments can be used, too.
These also work for each release that is supported by this repo.
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. Note that branches for some releases, from early 2023 to late 2024, are currently missing because the repository was not being actively updated during that time.
Don't.
This isn't designed for production use, this is for local or trusted use only.
There are a few example notebooks included in the image, their usefulness might vary according to your experience level.
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.
- MBSE4U.com is where I found the meta commands.
- Also from MBSE4U.com, the example notebook at nbviewer.jupyter.org.
Free & Fair DockerHub releases are pushed automatically by GitHub continuous deployment when the main
branch is updated. The procedure for making a new release for a new SysMLv2 release is as follows.
When a new release tag becomes available, the following things need doing:
- Ensure there is a corresponding API Server release.
- Start a new branch from the main branch, and follow this commit to update all dockerfiles & Makefile for the new release (in this case 2024-09 SysMLv2 with 2024-07 API server).
- Run
make build
to check that all dockerfiles build locally. Make sure that Docker is running locally. - In a terminal window, run
make spin-up
to start a Jupyter server locally. - In another terminal 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. - Create a GitHub PR for the new branch and make sure that the GitHub Actions check succeeds.
- Merge the PR to
main
. - Done. The new DockerHub image should be deployed to DockerHub automatically.
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.