Docker images and FastAPI service for the withoutBG open weights ONNX model.
| Image | Description |
|---|---|
withoutbg-openweights-v3-service-cpu |
Inference API only (CPU) |
withoutbg-openweights-v3-service-gpu |
Inference API only (GPU) |
withoutbg-openweights-v3-app-cpu |
Web UI + API (CPU) |
withoutbg-openweights-v3-app-gpu |
Web UI + API (GPU) |
Docker Hub: withoutbg/withoutbg-openweights-v3-*
CPU images are published for linux/amd64 and linux/arm64 (Intel/AMD and Apple Silicon / ARM servers). GPU images are linux/amd64 only (NVIDIA CUDA).
docker buildx bake -f docker-bake.hclBuild a single image:
docker buildx bake -f docker-bake.hcl app-cpuBuild for one platform locally (faster on Apple Silicon):
docker buildx bake -f docker-bake.hcl app-cpu --set '*.platform=linux/arm64'CI downloads the ~455 MB model once via huggingface_hub. Add a HF_TOKEN repository secret for reliable Hugging Face downloads from GitHub Actions.
docker run --rm -p 8000:8000 withoutbg-openweights-v3-service-cpu
docker run --rm -p 8080:8080 withoutbg-openweights-v3-app-cpuGPU images require an NVIDIA GPU and the NVIDIA Container Toolkit:
docker run --rm --gpus all -p 8000:8000 withoutbg/withoutbg-openweights-v3-service-gpu:latest
docker run --rm --gpus all -p 8080:8080 withoutbg/withoutbg-openweights-v3-app-gpu:latestAfter baking, use Compose:
docker compose up app-cpuProduction Docker images bake the ~455 MB model at build time and do not hot-reload. For day-to-day work, use native dev with a one-time model download:
# 1. Download model once (~455 MB, cached in .cache/model/)
./scripts/dev-download-model.sh
# 2. API with hot reload (port 8000)
./scripts/dev-api.sh
# 3. UI with hot reload (port 3000, proxies /api → :8000)
cd ui && npm install && npm run devEdit Python under service/ or model/ and uvicorn reloads automatically. Edit React under ui/src/ and Next.js hot-reloads.
UI-only work (no real inference): NEXT_PUBLIC_USE_MOCK=true npm run dev in ui/.
Docker dev (same hot reload, cached model mount):
./scripts/dev-download-model.sh
docker compose -f docker-compose.dev.yml up --buildThe first docker compose -f docker-compose.dev.yml build installs Python deps only (no model download). Rebuild only when pyproject.toml changes.
Production-like testing still uses docker buildx bake + docker compose up service-cpu.
Apache-2.0 for this repository's code. Built with DINOv3. See THIRD_PARTY_NOTICES.md for upstream model attribution.