mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
docs: clarify nvidia cuda ai support (#378)
This commit is contained in:
@@ -4,7 +4,7 @@ description: Deploy SnapOtter to production with Docker. Hardware requirements,
|
||||
|
||||
# Deployment
|
||||
|
||||
SnapOtter deploys as a 3-container Docker Compose stack: the SnapOtter app image, PostgreSQL 17, and Redis 8. The app image supports **linux/amd64** (with NVIDIA CUDA) and **linux/arm64** (CPU), so it runs natively on Intel/AMD servers, Apple Silicon Macs, and ARM devices like the Raspberry Pi 4/5.
|
||||
SnapOtter deploys as a 3-container Docker Compose stack: the SnapOtter app image, PostgreSQL 17, and Redis 8. The app image supports **linux/amd64** (with NVIDIA CUDA for AI acceleration) and **linux/arm64** (CPU), so it runs natively on Intel/AMD servers, Apple Silicon Macs, and ARM devices like the Raspberry Pi 4/5. Intel/AMD iGPU acceleration through VA-API, Quick Sync, or OpenCL is not supported for AI inference today.
|
||||
|
||||
See [Docker Image](./docker-tags) for GPU setup, Docker Compose examples, and version pinning.
|
||||
|
||||
@@ -108,9 +108,9 @@ The app is then available at `http://localhost:1349`.
|
||||
|
||||
> **Docker Hub rate limits?** Replace `snapotter/snapotter:latest` with `ghcr.io/snapotter-hq/snapotter:latest` to pull from GitHub Container Registry instead. Both registries receive the same image on every release.
|
||||
|
||||
## Quick Start (GPU)
|
||||
## Quick Start (NVIDIA CUDA)
|
||||
|
||||
For NVIDIA GPU acceleration on AI tools (background removal, upscaling, face enhancement, OCR):
|
||||
For NVIDIA CUDA acceleration on AI tools (background removal, upscaling, face enhancement, OCR):
|
||||
|
||||
```yaml
|
||||
# docker-compose-gpu.yml - Requires: NVIDIA GPU + nvidia-container-toolkit
|
||||
@@ -198,11 +198,11 @@ volumes:
|
||||
docker compose -f docker-compose-gpu.yml up -d
|
||||
```
|
||||
|
||||
Check GPU detection in the logs:
|
||||
Check CUDA detection in the logs:
|
||||
|
||||
```bash
|
||||
docker logs SnapOtter 2>&1 | head -20
|
||||
# Look for: [INFO] GPU detected — AI tools will use CUDA acceleration
|
||||
# Look for: [gpu] CUDA available via torch
|
||||
```
|
||||
|
||||
## Hardware Requirements
|
||||
@@ -215,7 +215,7 @@ These numbers come from benchmarks run across four systems (Apple M2 Max, AMD Ry
|
||||
|------|----------|-----|-----|-----|---------|
|
||||
| Minimum | Core tools, single user | 1 core | 1 GB | None | 5 GB |
|
||||
| Recommended | All tools + AI on CPU | 4 cores | 4 GB | None | 20 GB |
|
||||
| Full | All tools + AI on GPU | 4+ cores | 8 GB | NVIDIA 8 GB+ | 30 GB |
|
||||
| Full | All tools + AI on NVIDIA CUDA | 4+ cores | 8 GB | NVIDIA 8 GB+ | 30 GB |
|
||||
|
||||
### Minimum (core tools, no AI)
|
||||
|
||||
@@ -275,7 +275,7 @@ deploy:
|
||||
memory: 4G
|
||||
```
|
||||
|
||||
### Full (AI tools on GPU)
|
||||
### Full (AI tools on NVIDIA CUDA)
|
||||
|
||||
| Resource | Requirement |
|
||||
|---|---|
|
||||
@@ -284,7 +284,7 @@ deploy:
|
||||
| GPU | NVIDIA with 8+ GB VRAM (12 GB recommended) |
|
||||
| Disk | 30 GB total |
|
||||
|
||||
GPU acceleration gives 3-13,000x speedup depending on the operation. Measured on an RTX 4070 vs Intel i7-7600U:
|
||||
NVIDIA CUDA acceleration gives 3-13,000x speedup depending on the operation. Measured on an RTX 4070 vs Intel i7-7600U:
|
||||
|
||||
| AI Tool | GPU Time | CPU Time | Speedup |
|
||||
|---|---|---|---|
|
||||
@@ -297,7 +297,9 @@ GPU acceleration gives 3-13,000x speedup depending on the operation. Measured on
|
||||
| restore-photo | 31s | 90s | 2.9x |
|
||||
| colorize | 10s | 13s | 1.3x |
|
||||
|
||||
Peak VRAM usage reaches 7.5 GB during upscale with face enhancement. A 6 GB GPU works for most AI tools individually but will fail on upscale. 8-12 GB VRAM handles everything.
|
||||
Peak VRAM usage reaches 7.5 GB during upscale with face enhancement. A 6 GB NVIDIA GPU works for most AI tools individually but will fail on upscale. 8-12 GB VRAM handles everything.
|
||||
|
||||
Intel/AMD iGPU acceleration through VA-API, Quick Sync, or OpenCL is not supported for AI inference today. Mapping `/dev/dri` into the container does not enable AI GPU acceleration; SnapOtter will run AI tools on CPU unless NVIDIA CUDA is available.
|
||||
|
||||
```yaml
|
||||
deploy:
|
||||
|
||||
@@ -14,15 +14,17 @@ docker run -d --name SnapOtter -p 1349:1349 -v SnapOtter-data:/data snapotter/sn
|
||||
|
||||
With no `DATABASE_URL` set, this runs in embedded mode: PostgreSQL and Redis start inside the container on loopback, with all data under the `SnapOtter-data` volume. Set `DATABASE_URL` and `REDIS_URL` (as the [Compose](#docker-compose) stack does) to use external services instead. See [Configuration](/guide/configuration#embedded-mode).
|
||||
|
||||
## GPU acceleration
|
||||
## NVIDIA CUDA acceleration
|
||||
|
||||
The image includes CUDA support on amd64. If you have an NVIDIA GPU with the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) installed, add `--gpus all`:
|
||||
The image includes NVIDIA CUDA support on amd64. If you have an NVIDIA GPU with the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) installed, add `--gpus all`:
|
||||
|
||||
```bash
|
||||
docker run -d --name SnapOtter --gpus all -p 1349:1349 -v SnapOtter-data:/data snapotter/snapotter:latest
|
||||
```
|
||||
|
||||
The image auto-detects your GPU at runtime. Without `--gpus all`, it runs on CPU. Same image either way.
|
||||
The image auto-detects CUDA at runtime. Without `--gpus all`, or when CUDA is unavailable, AI tools run on CPU. Same image either way.
|
||||
|
||||
Intel/AMD iGPU acceleration through VA-API, Quick Sync, or OpenCL is not supported for SnapOtter AI inference today. Mapping `/dev/dri` into the container can expose the render device, but the AI runtime will still use CPU unless CUDA is available.
|
||||
|
||||
### Benchmarks
|
||||
|
||||
@@ -47,9 +49,9 @@ Tested on an NVIDIA RTX 4070 (12 GB VRAM) with a 572x1024 JPEG portrait.
|
||||
| Upscale 2x | 3,957ms | 2,318ms | 1.7x |
|
||||
| OCR (PaddleOCR) | 1,469ms | 1,090ms | 1.3x |
|
||||
|
||||
### GPU health check
|
||||
### CUDA health check
|
||||
|
||||
After the first AI request, the admin health endpoint reports GPU status:
|
||||
After the first AI request, the admin health endpoint reports CUDA GPU status:
|
||||
|
||||
```
|
||||
GET /api/v1/admin/health
|
||||
@@ -118,7 +120,7 @@ volumes:
|
||||
SnapOtter-redisdata:
|
||||
```
|
||||
|
||||
For GPU acceleration via Docker Compose, add the deploy section to the SnapOtter service:
|
||||
For NVIDIA CUDA acceleration via Docker Compose, add the deploy section to the SnapOtter service:
|
||||
|
||||
```yaml
|
||||
deploy:
|
||||
@@ -143,7 +145,7 @@ For GPU acceleration via Docker Compose, add the deploy section to the SnapOtter
|
||||
|
||||
| Architecture | GPU support | Notes |
|
||||
|---|---|---|
|
||||
| linux/amd64 | NVIDIA CUDA | Full GPU acceleration for AI tools |
|
||||
| linux/amd64 | NVIDIA CUDA | Full CUDA acceleration for AI tools |
|
||||
| linux/arm64 | CPU only | Raspberry Pi 4/5, Apple Silicon via Docker Desktop |
|
||||
|
||||
## Migration from previous tags
|
||||
|
||||
@@ -18,14 +18,14 @@ This single container runs everything it needs: with no `DATABASE_URL` set, it s
|
||||
|
||||
You will be asked to change your password on first login.
|
||||
|
||||
::: tip NVIDIA GPU acceleration
|
||||
Add `--gpus all` for GPU-accelerated background removal, upscaling, OCR, face enhancement, and restoration:
|
||||
::: tip NVIDIA CUDA acceleration
|
||||
Add `--gpus all` for NVIDIA CUDA-accelerated background removal, upscaling, OCR, face enhancement, and restoration:
|
||||
|
||||
```bash
|
||||
docker run -d --name SnapOtter -p 1349:1349 --gpus all -v SnapOtter-data:/data snapotter/snapotter:latest
|
||||
```
|
||||
|
||||
Requires the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). Falls back to CPU automatically. See [Docker Tags](/guide/docker-tags) for benchmarks.
|
||||
Requires the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). Falls back to CPU automatically when CUDA is unavailable. Intel/AMD iGPU acceleration through VA-API, Quick Sync, or OpenCL is not supported for AI inference today. See [Docker Tags](/guide/docker-tags) for benchmarks.
|
||||
:::
|
||||
|
||||
::: details Also on GHCR
|
||||
|
||||
Reference in New Issue
Block a user