Repository navigation
Getting Started
- Docker Desktop, Docker Engine, or another Docker installation with Compose v2
- About 4 GB of free RAM
- A browser
Python, a database, and a market-data subscription are not required.
docker run --rm -p 8501:8501 ghcr.io/sergeyger/derivlab:latestOpen http://localhost:8501. The image includes the bundled seed and runs the deterministic local AI models; no API key is required.
Prefer a hosted widget? Use the Try the offline demo button. Streamlit Community Cloud builds from GitHub; the first deploy requires authorizing Streamlit with GitHub. The app itself needs no secrets.
git clone https://github.com/SergeyGer/DerivLab.git
cd DerivLab
docker compose up --buildOpen http://localhost:8501.
The first build takes a few minutes because native build tools are isolated in a builder stage. The app starts from the bundled five-year seed, so the demo works offline.
docker compose stop # keep the container and cache
docker compose up -d # start again
docker compose down # remove the container (the named cache volume remains)The AI Arena is fully functional without a key. If you want live OpenAI critic
and news, create a local .env file:
cp .env.example .env
# edit .env and set:
# DERIVLAB_LLM_PROVIDER=openai
# DERIVLAB_LLM_API_KEY=sk-...
# DERIVLAB_CRITIC_MODEL=gpt-4.1
# DERIVLAB_NEWS_MODEL=gpt-4.1-mini
docker compose up -d --force-recreateThe app shows the actual active model names in the sidebar, rival cards, leaderboard, report header, and Model Stack tab. It never renders the API key.
GPT-5 note:
gpt-5andgpt-5-minirequire organization verification. If OpenAI returns a404asking you to verify the organization, usegpt-4.1/gpt-4.1-minior another model available to your account. See AI Model Guide.
For Anthropic, Ollama, vLLM, LM Studio, and other providers, see the AI Model Guide.
The app works with the bundled seed. To refresh locally:
From the UI: Data Vault → Refresh all (5Y).
From the command line:
docker compose run --rm derivlab-seedThe seeder retries transient failures and never deletes a good cache file when a download fails. See Data Pipeline.
python3.10 -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
streamlit run app.pyThe local launcher reads a project-root .env automatically. Shell environment
variables take priority over the file.
Run the test suite:
pytest -q
ruff check .The repository includes .devcontainer/:
- Install the Dev Containers extension.
- Open the repository.
- Dev Containers: Reopen in Container.
The container runs Python 3.10, forwards port 8501, installs dependencies, and
uses shutdownAction: stopContainer. It is designed for developers on different
laptops and avoids host-specific paths. See Deployment.
curl -fsS http://127.0.0.1:8501/_stcore/health
docker inspect derivlab-app --format '{{.State.Health.Status}}'Expected: 200 from the health endpoint and healthy from Docker.
DerivLab · 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