Adds Ingest → YouTube. UI takes a URL + project, API enqueues a BullMQ
"import" job, worker shells out to yt-dlp, lands the MP4 in S3 at the
same originals/{assetId}/... path uploads use, then hands off to the
existing proxy queue. Imported assets share one lifecycle with uploads
from that point on.
Worker container picks up yt-dlp + python3 (apk on alpine, apt on the
GPU variant). The new 'import' queue is registered in jobs.js so it
appears in the Jobs SSE stream and retry/delete work for free.
Spec: docs/superpowers/specs/2026-05-23-youtube-importer-design.md
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
24 lines
978 B
Text
24 lines
978 B
Text
# 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, ffmpeg (Ubuntu's ffmpeg includes h264_nvenc/hevc_nvenc),
|
|
# and yt-dlp (+ python3 runtime) for the YouTube importer.
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl ca-certificates ffmpeg yt-dlp python3 \
|
|
&& 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 install --omit=dev
|
|
COPY src ./src
|
|
|
|
CMD ["node", "src/index.js"]
|