docs: add CUDA tag to README, getting-started, deployment, benchmarks

- README: add CUDA docker run example alongside full and lite
- Getting started: add GPU acceleration tip with speedup numbers
- Deployment: add CUDA row to variants table
- Docker tags: expand benchmarks with warm + cold start tables
This commit is contained in:
Siddharth Kumar Sah
2026-04-05 20:35:24 +08:00
parent 9381564269
commit f1ae974de9
4 changed files with 42 additions and 11 deletions
+2 -1
View File
@@ -2,12 +2,13 @@
Stirling Image ships as a single Docker container. The image supports **linux/amd64** and **linux/arm64**, so it runs natively on Intel/AMD servers, Apple Silicon Macs, and ARM devices like the Raspberry Pi 4/5.
Two variants are available:
Three variants are available:
| Variant | Tag | Size | What's included |
|---------|-----|------|-----------------|
| Full | `:latest` | ~11 GB | All tools + AI/ML (background removal, upscaling, OCR, face blur, object eraser) |
| Lite | `:lite` | ~1.5 GB | All image processing tools, no AI/ML |
| CUDA | `:cuda` | ~14 GB | Full + GPU-accelerated AI (NVIDIA only, amd64) |
See [Docker Tags](./docker-tags) for the full comparison, Docker Compose examples, and version pinning.
+23 -9
View File
@@ -45,18 +45,32 @@ Same tools as the full image, but built with GPU-accelerated Python packages (on
Requires [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) on the host. Linux amd64 only.
### What gets faster with GPU
### Benchmarks
| Tool | CPU | GPU (RTX 4070) | Speedup |
|------|-----|----------------|---------|
| Background removal | 2.4s | 0.9s | 2.7x |
| Upscale 2x | 350ms | 310ms | ~1.1x |
| Upscale 4x | 910ms | 310ms | ~3x |
| OCR (PaddleOCR) | 137ms | 94ms | ~1.5x |
Tested on an NVIDIA RTX 4070 (12 GB VRAM) with a 572x1024 JPEG portrait. Both images ran on the same machine. "Warm" means the model is already loaded in memory (second request onward).
Benchmarked with a 572x1024 JPEG portrait. Larger images show bigger speedups, especially for upscaling.
#### Warm performance
Non-AI tools (resize, crop, convert, etc.) are unaffected since they use Sharp (CPU-based).
| Tool | CPU | GPU | Speedup |
|------|-----|-----|---------|
| Background removal (u2net) | 2,415ms | 879ms | 2.7x |
| Background removal (isnet) | 2,457ms | 1,137ms | 2.2x |
| Upscale 2x | 350ms | 309ms | 1.1x |
| Upscale 4x | 910ms | 310ms | 2.9x |
| OCR (PaddleOCR) | 137ms | 94ms | 1.5x |
| Face blur | 139ms | 122ms | 1.1x |
#### Cold start (first request after container start)
| Tool | CPU | GPU | Speedup |
|------|-----|-----|---------|
| Background removal | 22,286ms | 4,792ms | 4.7x |
| Upscale 2x | 3,957ms | 2,318ms | 1.7x |
| OCR (PaddleOCR) | 1,469ms | 1,090ms | 1.3x |
Cold start includes loading the model into memory. GPU cold starts are faster because CUDA parallelizes the model loading.
Larger images show bigger speedups, especially for upscaling. Non-AI tools (resize, crop, convert, etc.) are unaffected since they use Sharp (CPU-based).
### GPU health check
+10
View File
@@ -24,6 +24,16 @@ stirlingimage/stirling-image:lite
All 27+ image processing tools work the same. See [Docker Tags](./docker-tags) for the full comparison.
:::
::: tip GPU acceleration
Have an NVIDIA GPU? The CUDA image auto-detects your GPU and accelerates background removal (2.7x), upscaling (3x), and OCR (1.5x):
```bash
docker run -d --gpus all -p 1349:1349 -v stirling-data:/data stirlingimage/stirling-image:cuda
```
Requires [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). Falls back to CPU if no GPU is found. See [Docker Tags](./docker-tags) for details and benchmarks.
:::
## Run with Docker Compose
Create a `docker-compose.yml`: