Spaces:
Paused
Paused
File size: 673 Bytes
1975e32 40b4757 1975e32 40b4757 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | FROM node:20-bookworm-slim
# 1. Install ffmpeg, python3 (Bookworm installs Python 3.11+), and curl
RUN apt-get update && apt-get install -y \
ffmpeg python3 curl \
&& rm -rf /var/lib/apt/lists/*
# 2. Download and install the official yt-dlp binary directly from GitHub
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp \
&& chmod a+rx /usr/local/bin/yt-dlp
# 3. Setup Hugging Face User
USER node
WORKDIR /home/node/app
# 4. Install Node modules
COPY --chown=node:node package*.json ./
RUN npm install
# 5. Copy the rest of the application
COPY --chown=node:node . .
EXPOSE 7860
CMD ["node", "server.js"] |