This project has the following batteries includes:
- uv package manager
- ruff formatter
- FastAPI web framework
- PySCIPOpt interface
- SCIP MIP solver
- Hurl API tester
Install uv first:
curl -LsSf https://astral.sh/uv/install.sh | shInstall dependencies:
uv syncOptionally, install Hurl to run API tests: https://hurl.dev/docs/installation.html
uv run src/model_example.pyuv run fastapi dev src/api_example.pyRun Hurl tests:
hurl --test hello.hurlThe Docker image starts a webserver and includes PySCIPOpt bindings and the SCIP Solver.
The PySCIPOpt module only has amd64 Linux binaries. Therefore, building a native image on Apple Silicon is not possible.
On amd64 architecture:
docker build -t fastapi-pyscipopt-example .On arm64 architecture (Apple Silicon):
docker buildx build --platform linux/amd64 -t fastapi-pyscipopt-example .Running:
docker run -p 8000:80 fastapi-pyscipopt-example