A self-hosted machine learning platform. Github: ` https://github.com/Amanbig/MLCore`
1.3K
A self-hosted machine learning platform โ upload datasets, wrangle data, train models, run predictions, download trained models, and monitor everything from a Grafana-style dashboard.
One Docker image. One port. No extra services.
| Light Mode | Dark Mode |
|---|---|
![]() | ![]() |
.joblib files for use outside the platform# Docker Hub
docker run -d \
-p 8000:8000 \
-v mlcore-db:/data \
-v mlcore-uploads:/app/server/uploads \
--name mlcore \
procoder588/mlcore:latest
# GitHub Container Registry
docker run -d \
-p 8000:8000 \
-v mlcore-db:/data \
-v mlcore-uploads:/app/server/uploads \
--name mlcore \
ghcr.io/Amanbig/mlcore:latest
Open http://localhost:8000โ โ UI and API both served from the same port.
All variables are optional โ the defaults work immediately. Pass them with -e to docker run or in a docker-compose.yml.
| Variable | Default | Description |
|---|---|---|
JWT_SECRET | development | Set this to a secret value in production |
DISABLE_SIGNUP | False | True to hide the Sign Up tab and block the endpoint |
DEFAULT_ADMIN_EMAIL | (none) | Auto-create an admin on first boot |
DEFAULT_ADMIN_PASSWORD | (none) | Password for the auto-created admin |
Example with a locked-down admin-only instance:
docker run -d \
-p 8000:8000 \
-v mlcore-db:/data \
-v mlcore-uploads:/app/server/uploads \
-e JWT_SECRET=my-super-secret \
-e DISABLE_SIGNUP=True \
-e [email protected] \
-e DEFAULT_ADMIN_PASSWORD=StrongP@ssw0rd! \
--name mlcore \
procoder588/mlcore:latest
| Volume | Path in container | Purpose |
|---|---|---|
mlcore-db | /data | SQLite database โ isolated from server code |
mlcore-uploads | /app/server/uploads | Datasets + model files |
| Tool | Version | Install |
|---|---|---|
| Python | โฅ 3.10 | python.orgโ |
| uv | latest | see below |
| Node.js | โฅ 18 | nodejs.orgโ |
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
cd server
# Install dependencies into an auto-managed .venv
uv sync
# Start with hot-reload
uv run dev # โ http://localhost:8000
Interactive API docs: http://localhost:8000/docsโ
cd client
# Install dependencies
npm install
# Start dev server (proxies /api/* โ :8000 automatically)
npm run dev # โ http://localhost:5173
Open two terminals:
terminal 1 โ cd server && uv run dev
terminal 2 โ cd client && npm run dev
The Vite proxy handles CORS โ no extra config needed.
# From the repo root
docker build -t mlcore:local .
docker run -d -p 8000:8000 --name mlcore mlcore:local
The Dockerfile is multi-stage:
node:22-alpine โ builds the Vite client (npm run build)python:3.13-slim โ installs the server with uv, copies the client build into server/static/Two workflow files in .github/workflows/:
push to main
โ
โโโบ lint.yml โ ruff (Python) + biome + tsc (TypeScript)
โ runs on every push and PR
โ
โโโบ release.yml โ full pipeline:
โ
โโ lint-server (ruff) โโ
โโ lint-client (biome) โโ parallel
โโ typecheck (tsc) โโ
โ
โโ version โ reads version from pyproject.toml
โ creates git tag v<X.Y.Z> if new
โ
โโ build-and-push โ builds Docker image
โ pushes to DockerHub + GHCR
โ
โโ github-release โ creates GitHub Release page
with auto-generated changelog
+ Docker pull instructions
version in server/pyproject.toml:
[project]
version = "0.2.0"
main:
git add server/pyproject.toml
git commit -m "chore: bump version to 0.2.0"
git push origin main
v0.2.0Add these in GitHub โ Settings โ Secrets and variables โ Actions:
| Secret | Description |
|---|---|
DOCKERHUB_USERNAME | Your Docker Hub username |
DOCKERHUB_TOKEN | Docker Hub โ Account Settings โ Security โ New Access Token (Read & Write) |
GITHUB_TOKEN is injected automatically โ no setup needed.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Docker container โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ FastAPI โ โ Vite build โ โ
โ โ /api/* โ โ served as static โ โ
โ โ โ โ SPA (index.html โ โ
โ โ auth, datasets, โ โ fallback) โ โ
โ โ models, stats โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ uvicorn :8000 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Concern | Detail |
|---|---|
| API | /api/* โ all backend routes |
| UI | Everything else โ SPA fallback to index.html |
| Datasets | server/uploads/datasets/ |
| Models | server/uploads/models/ |
| Database | SQLite โ server/mlcore_db.db (mount a volume to persist) |
| Client (prod) | server/static/ โ Vite build copied in at Docker build time |
MLCore/
โโโ Dockerfile Multi-stage build (Node โ Python)
โโโ .dockerignore
โโโ Readme.md โ you are here
โโโ client/ Vite + React frontend
โ โโโ src/
โ โโโ biome.json Linter / formatter config
โ โโโ package.json
โ โโโ vite.config.ts
โ โโโ README.md
โโโ server/ FastAPI backend
โโโ src/
โ โโโ main.py
โ โโโ modules/ auth, dataset, file, ml_model, stats, user
โโโ migrations/ Alembic migrations
โโโ scripts/ CLI entry points
โโโ pyproject.toml Dependencies + ruff config
โโโ uv.lock
โโโ README.md
Contributions are welcome! Please see the CONTRIBUTING.mdโ file for guidelines on how to set up the project locally, run tests, and submit pull requests.
This project is licensed under the MIT Licenseโ .
Content type
Image
Digest
sha256:eb9c6880dโฆ
Size
185.7 MB
Last updated
5 months ago
docker pull procoder588/mlcore