feat: GPU worker Dockerfile using CUDA base with ffmpeg NVENC support
This commit is contained in:
parent
1725ec1de9
commit
76281b7564
1 changed files with 23 additions and 0 deletions
23
services/worker/Dockerfile.gpu
Normal file
23
services/worker/Dockerfile.gpu
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# GPU-accelerated worker — requires NVIDIA Container Toolkit on the host
|
||||
# Build: docker compose -f docker-compose.yml -f docker-compose.gpu.yml build worker
|
||||
#
|
||||
# Prerequisites:
|
||||
# - NVIDIA drivers installed on host
|
||||
# - NVIDIA Container Toolkit: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/
|
||||
# - GPU capability in docker-compose.gpu.yml enables NVENC access
|
||||
|
||||
FROM nvcr.io/nvidia/cuda:12.3.1-base-ubuntu22.04
|
||||
|
||||
# Install Node.js 20 and ffmpeg (Ubuntu's ffmpeg includes h264_nvenc/hevc_nvenc)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl ca-certificates ffmpeg \
|
||||
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||
&& apt-get install -y --no-install-recommends nodejs \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
COPY src ./src
|
||||
|
||||
CMD ["node", "src/index.js"]
|
||||
Loading…
Reference in a new issue