This guide explains how to run PFlow-jl with Jupyter notebook in a Docker container.
- Docker installed on your system
- Docker Compose (optional, but recommended)
- Build and start the container:
docker-compose up-
Open your browser and navigate to the URL displayed in the terminal (typically
http://127.0.0.1:8888/?token=...) -
The
./notebooksdirectory is automatically mounted, so any changes you make in Jupyter will be reflected in your local filesystem.
- Build the image:
docker build -t pflow-jl .- Run the container:
docker run -p 8888:8888 -v $(pwd)/notebooks:/workspace/notebooks pflow-jl- Open your browser and navigate to the URL displayed in the terminal.
- Latest Julia: The container uses the latest official Julia image
- Jupyter Notebook: Pre-configured with IJulia kernel
- Volume Mount: The
./notebooksdirectory is mounted to persist your work - Pre-installed Dependencies: All PFlow-jl dependencies are pre-installed and precompiled
- If using Docker Compose: Press
Ctrl+Cin the terminal, then rundocker-compose down - If using Docker CLI: Press
Ctrl+Cin the terminal
If you modify the Project.toml or source code:
docker-compose down
docker-compose build --no-cache
docker-compose upIf port 8888 is already in use, modify the port mapping in docker-compose.yml:
ports:
- "8889:8888" # Use port 8889 on your hostIf you encounter permission issues with the mounted notebooks directory, you may need to adjust the ownership:
sudo chown -R $USER:$USER ./notebooksThe repository includes example notebooks in the ./notebooks directory:
knapsack.ipynb: Example Petri net model for solving a knapsack problem