Skip to content

steffanschlein/fastapi-pyscipopt-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI PySCIPOpt Starter

This project has the following batteries includes:

Setup

Install uv first:

curl -LsSf https://astral.sh/uv/install.sh | sh

Install dependencies:

uv sync

Optionally, install Hurl to run API tests: https://hurl.dev/docs/installation.html

Running

PySCIPOpt Example

uv run src/model_example.py

FastAPI Example

uv run fastapi dev src/api_example.py

Testing

Run Hurl tests:

hurl --test hello.hurl

Building Docker container

The 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published