https://github.com/functionally/deltaq-jupyter
Jupyter kernel for DeltaQ
https://github.com/functionally/deltaq-jupyter
delta-qsd jupyter network simulation
Last synced: 8 months ago
JSON representation
Jupyter kernel for DeltaQ
- Host: GitHub
- URL: https://github.com/functionally/deltaq-jupyter
- Owner: functionally
- License: bsd-3-clause
- Created: 2024-12-17T19:27:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-23T13:57:05.000Z (about 1 year ago)
- Last Synced: 2024-12-23T14:46:28.762Z (about 1 year ago)
- Topics: delta-qsd, jupyter, network, simulation
- Language: Nix
- Homepage:
- Size: 562 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE
Awesome Lists containing this project
README
# Jupyter kernel for DeltaQ
A customized Jupyter iHaskell kernel for use with the [deltaq](https://github.com/DeltaQ-SD/deltaq) tool.
## Running a Jupyter server using Nix
Launch Jupyter with the iHaskell kernel including the `deltaq` and `probability-polynomial` packages:
```bash
nix run
```
In fact, this Jupyter kernel can be launced without directly cloning this repository:
```bash
nix run github:functionally/deltaq-jupyter
```
## Docker
### Building a docker image using Nix
First build the image.
```console
$ nix build -o deltaq-jupyter-docker.tar.gz ".#docker"
$ docker load --quiet < deltaq-jupyter-docker.tar.gz
Loaded image: localhost/jupyter-deltaq:2mf9zcagms0isg5n94xsml34kj4bn42k
```
### Push to docker registry
You can push the image to a registry.
```bash
docker push localhost/jupyter-deltaq:2mf9zcagms0isg5n94xsml34kj4bn42k \
docker.io/bwbush/jupyter-deltaq:2mf9zcagms0isg5n94xsml34kj4bn42k
```
### Run the server in docker.
You can run the local image, exposing the service on port 9999 for example. The container should have at least 4 GB of memory and two CPUs, but larger computations require more memory. If you deploy this on kubernetes, you can use the HTTP path `/api` as the health check.
Locally,
```bash
docker run --publish 9999:8888 localhost/jupyter-deltaq:2mf9zcagms0isg5n94xsml34kj4bn42k
```
or from DockerHub,
```bash
docker run --publish 9999:8888 ghcr.io/functionally/deltaq-jupyter:latest
```
The default password is `deltaq`: you can change this by visiting http://localhost:9999/lab in a web browser. Alternatively, you can use with the default password by visiting http://localhost:9999/lab?token=deltaq.
Use the "upload" and "download" features to move notebooks in and out of the container.
## Updates
In order to use the latest version of the `deltaq` packages, update the nix flake.
```bash
nix flake lock --update-input deltaq
```