darkvibe314 commited on
Commit
40b4757
·
verified ·
1 Parent(s): 9ba8c0e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18-bullseye-slim
2
+
3
+ # 1. Install ffmpeg, python, and curl (required for heavy-duty video processing)
4
+ RUN apt-get update && apt-get install -y \
5
+ ffmpeg python3 curl \
6
+ && rm -rf /var/lib/apt/lists/*
7
+
8
+ # 2. Download and install the official yt-dlp binary directly from GitHub
9
+ RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp \
10
+ && chmod a+rx /usr/local/bin/yt-dlp
11
+
12
+ # 3. Setup Hugging Face User
13
+ USER node
14
+ WORKDIR /home/node/app
15
+
16
+ # 4. Install Node modules
17
+ COPY --chown=node:node package*.json ./
18
+ RUN npm install
19
+
20
+ # 5. Copy the rest of the application
21
+ COPY --chown=node:node . .
22
+
23
+ EXPOSE 7860
24
+ CMD ["node", "server.js"]