feat: switch to nvidia/cuda base image for NVENC hw encoding

- Base: nvidia/cuda:12.6.3-runtime-ubuntu24.04
- ffmpeg from apt has NVENC support when GPU runtime is available
- docker-compose reserves all GPUs via deploy.resources

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-16 14:47:19 +02:00
parent b09ba3fa9e
commit 80f21915e3
2 changed files with 15 additions and 3 deletions
+8 -3
View File
@@ -1,8 +1,13 @@
FROM python:3.12-slim FROM nvidia/cuda:12.6.3-runtime-ubuntu24.04
RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app WORKDIR /app
COPY core/ core/ COPY core/ core/
COPY server/ server/ COPY server/ server/
RUN pip install --no-cache-dir fastapi uvicorn[standard] RUN pip install --no-cache-dir --break-system-packages fastapi uvicorn[standard]
EXPOSE 8000 EXPOSE 8000
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"] CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"]
+7
View File
@@ -12,6 +12,13 @@ services:
EXPORT_DIR: /exports EXPORT_DIR: /exports
DB_PATH: /data/8cut.db DB_PATH: /data/8cut.db
CACHE_DIR: /data/cache CACHE_DIR: /data/cache
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes: volumes:
8cut-data: 8cut-data: