| title | Bladelab |
|---|---|
| emoji | 🦀 |
| colorFrom | pink |
| colorTo | yellow |
| sdk | docker |
| app_port | 7860 |
| pinned | false |
Physics-driven turbomachinery design environment with both a local Flask API and an OpenEnv-compatible FastAPI server.
turbodesigner2.0/
├── api/ # Web API (Flask)
│ ├── app.py
│ └── routes.py
├── env/ # Environment module
│ ├── core_env.py
│ ├── physics.py
│ ├── reward.py
│ ├── tasks.py
│ └── graders.py
├── tests/ # Test suite
│ ├── test_api.py
│ └── test_env.py
├── client.py # OpenEnv client wrapper
├── models.py # OpenEnv-facing models
├── server/ # OpenEnv FastAPI server
├── inference.py # Baseline inference loop
├── openenv.yaml # OpenEnv manifest
├── pyproject.toml # OpenEnv packaging metadata
├── uv.lock # uv lockfile
├── Dockerfile
├── requirements.txt
└── README.md
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtOpenAI-backed inference is configured from environment variables at runtime.
The project keeps secrets in a local .env file or in the host environment.
.env is ignored by git and should not be committed.
Start from the checked-in .env.example template and create a local .env:
cp .env.example .envOn Windows PowerShell:
Copy-Item .env.example .envAll runtime entrypoints import the template through python-dotenv, so copying the template is enough for the local scripts and flask app to pick up those values.
Variables used by the current code paths:
OPENAI_API_KEY: required only when using the OpenAI-backed policy pathsMODEL_NAME: optional; defaults togpt-4.1-miniAPI_BASE_URL: optional; takes precedence overOPENAI_BASE_URLwhen both are setOPENAI_BASE_URL: optional fallback for OpenAI-compatible endpointsHF_TOKEN: optional token for Hugging Face Space deployment or push workflows
You only need OpenAI credentials when:
- calling the API with
policy_type="openai" - running
python inference.py --openai
Heuristic policy flows and the current test suite do not require OPENAI_API_KEY.
python -m server.app --port 7860python -m api.apppython inference.pypython -m pytest tests/Build and run with Docker:
docker build -t turbodesigner2.0 .
docker run -p 7860:7860 turbodesigner2.0The Docker image installs runtime dependencies from requirements-server.txt
to keep validator builds fast and lightweight.
To use the OpenAI-backed policy in Docker, pass env vars at runtime instead of baking secrets into the image:
docker run --env-file .env -p 7860:7860 turbodesigner2.0For OpenEnv validation, the image should expose the FastAPI app on port 7860.
GET /api/health- Health checkPOST /api/predict- Run predictionGET /api/tasks- List available tasksPOST /reset- OpenEnv reset endpointPOST /step- OpenEnv step endpointGET /state- OpenEnv state endpointGET /schema- OpenEnv action/observation schema endpoint
MIT