esafux commited on
Commit
e5cc4bc
·
verified ·
1 Parent(s): cb69176

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Created by OMNSOUR - insta @kyanx7
2
+ FROM node:18-slim
3
+
4
+ # Install system dependencies for Chromium (libgbm1 and libasound2 are vital)
5
+ RUN apt-get update && apt-get install -y \
6
+ chromium \
7
+ fonts-freefont-ttf \
8
+ libxss1 \
9
+ libgbm1 \
10
+ libasound2 \
11
+ --no-install-recommends \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ WORKDIR /app
15
+
16
+ # Configure Puppeteer to use the system's pre-installed Chromium
17
+ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
18
+ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
19
+
20
+ # Copy package files and install dependencies
21
+ COPY package*.json ./
22
+ RUN npm install express puppeteer puppeteer-extra puppeteer-extra-plugin-stealth
23
+
24
+ # Copy the rest of the OM Proxy source code
25
+ COPY . .
26
+
27
+ # Hugging Face Spaces strictly require port 7860
28
+ EXPOSE 7860
29
+
30
+ # Startup command to launch the OM Qwen Proxy
31
+ CMD ["node", "qwen-server.js"]