Repository navigation
Deployment
flowchart TB
DEV[Pull request] --> RULES[Protect Main ruleset]
RULES --> CI[CI + CodeQL + Docs]
CI --> MAIN[Merge to main]
MAIN --> IMG[GHCR multi-arch image]
MAIN --> CLOUD[Streamlit Community Cloud]
IMG --> LOCAL[docker run]
LOCAL --> APP[Streamlit app]
CLOUD --> APP
APP --> SEED[Bundled seed]
APP --> LM[Deterministic local models]
APP -. optional .-> LLM[OpenAI / Anthropic]
In plain English: every route ends at the same app; the only difference is how it is hosted. The app always has a local path and an optional model path.
docker run --rm -p 8501:8501 ghcr.io/sergeyger/derivlab:latestThe Publish image workflow builds linux/amd64 and linux/arm64, tags
latest, the release version, and sha-<short>, and pushes to GHCR.
View the GHCR package. The image
contains the seed and local AI models; no API key is required.
Live demo: https://derivlab-pavyratzrx7won9iv4zmcg.streamlit.app/
The README's Try the offline demo button prefills the official deploy page
with this repository, main, and app.py. The owner authorizes the first
deploy; the app then runs without keys because the AI Arena falls back locally.
docker compose up -d --buildServices:
| Service | Purpose |
|---|---|
derivlab-app |
Streamlit app on port 8501; restart: "no"
|
derivlab-seed |
Optional profile seed; refreshes the cache; restart: "no"
|
The app uses the bundled seed and a named cache volume. It does not start automatically when the server reboots.
Copy .env.example to .env for local overrides. Compose reads .env for
substitution. Recreate after changes:
docker compose up -d --force-recreateDo not commit .env or .git-token. See Security.
curl -fsS http://127.0.0.1:8501/_stcore/health
docker inspect derivlab-app --format '{{.State.Health.Status}}'
docker compose logs -f derivlab-appdocker compose run --rm derivlab-seedOr use Data Vault → Refresh all (5Y).
DERIVLAB_PORT=8502 docker compose up -d
DERIVLAB_BIND_ADDR=0.0.0.0 docker compose up -dFor LAN access, place the app behind a reverse proxy with authentication. The default bind is loopback.
Open the repository in VS Code and choose Dev Containers: Reopen in Container.
The container uses Python 3.11, forwards 8501, installs dependencies, and stops
when the window closes.
- Use Docker secrets or a runtime secret manager for the LLM key; environment
variables are visible to
docker inspect. - Put the app behind TLS and authentication for shared deployments.
- Pin the image tag (
derivlab:1.2.0) rather than relying on a floating tag. - Keep
restart: "no"unless your platform explicitly requires a supervised restart policy. - Monitor outbound calls to the LLM provider for cost and latency.
docker compose down -v # removes the named cache volume
docker compose up -d --buildDerivLab · an educational options & futures strategy emulator · docs verified against v1.2.0 on 2026-10-23 · README · Docs feedback · MIT License · Not investment advice.
Start here
- Home
- Getting Started
- Compatibility & Versions
- Feature Tour
- FAQ
- Documentation & ADRs
- Versioning
- Roadmap
Core systems
- Architecture
- Backtest Engine
- Strategy Library
- AI Agents
- AI Model Guide
- LLM Quality & Safety
- Data Pipeline
- Game Mode
Engineering
- Configuration
- Testing & CI
- Deployment
- Security
- Project Structure
- Troubleshooting
- Glossary
- Release Notes