HackerBol commited on
Commit
d221c98
·
verified ·
1 Parent(s): 045926d

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +46 -0
Dockerfile ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.13
2
+
3
+ # Install system dependencies for Playwright + Node.js (for MCP servers)
4
+ RUN apt-get update && apt-get install -y \
5
+ git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 \
6
+ libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \
7
+ libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
8
+ libgbm1 libpango-1.0-0 libcairo2 libasound2 \
9
+ curl \
10
+ && rm -rf /var/lib/apt/lists/* \
11
+ && git lfs install
12
+
13
+ # Install Node.js 20.x (required for MCP servers — most are npm packages)
14
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
15
+ && apt-get install -y nodejs \
16
+ && node --version \
17
+ && npm --version
18
+
19
+ WORKDIR /app
20
+
21
+ COPY requirements.txt .
22
+ RUN pip install --no-cache-dir pip -U && \
23
+ pip install --no-cache-dir \
24
+ datasets "huggingface-hub>=0.30" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1"
25
+
26
+ RUN pip install --no-cache-dir -r requirements.txt \
27
+ gradio[oauth]==4.44.1 "uvicorn>=0.14.0" "websockets>=10.4" spaces
28
+
29
+ # Install curl_cffi for Chrome TLS fingerprint spoofing (Signal #51)
30
+ RUN pip install --no-cache-dir curl_cffi
31
+
32
+ # Install Playwright browsers
33
+ RUN playwright install chromium
34
+ RUN playwright install-deps chromium || true
35
+
36
+ # Pre-install popular MCP servers (cached for faster startup)
37
+ RUN npm install -g @anthropic/github-mcp 2>/dev/null || true
38
+ RUN npm install -g @anthropic/filesystem-mcp 2>/dev/null || true
39
+
40
+ COPY . .
41
+
42
+ EXPOSE 7860
43
+ ENV GRADIO_SERVER_NAME=0.0.0.0
44
+ ENV GRADIO_SERVER_PORT=7860
45
+
46
+ CMD ["python", "app.py"]