CoolFace
Apppublic

mydatascraper/competitor_compare

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes
Dockerfile69 linesDownload Raw Back to root
1FROM python:3.11-slim
2
3ENV PYTHONUNBUFFERED=1 \
4    PYTHONDONTWRITEBYTECODE=1 \
5    PIP_NO_CACHE_DIR=1 \
6    PORT=7860 \
7    HOME=/home/user \
8    PLAYWRIGHT_BROWSERS_PATH=/home/user/.cache/ms-playwright
9
10# Install system dependencies needed by Playwright/Chromium
11RUN apt-get update && apt-get install -y --no-install-recommends \
12    ca-certificates \
13    wget \
14    curl \
15    git \
16    fonts-liberation \
17    fonts-dejavu-core \
18    fonts-freefont-ttf \
19    fonts-unifont \
20    libasound2 \
21    libatk-bridge2.0-0 \
22    libatk1.0-0 \
23    libcairo2 \
24    libcups2 \
25    libdbus-1-3 \
26    libdrm2 \
27    libgbm1 \
28    libglib2.0-0 \
29    libgtk-3-0 \
30    libnspr4 \
31    libnss3 \
32    libpango-1.0-0 \
33    libu2f-udev \
34    libvulkan1 \
35    libwayland-client0 \
36    libx11-6 \
37    libx11-xcb1 \
38    libxcb1 \
39    libxcomposite1 \
40    libxdamage1 \
41    libxext6 \
42    libxfixes3 \
43    libxkbcommon0 \
44    libxrandr2 \
45    xdg-utils \
46    && rm -rf /var/lib/apt/lists/*
47
48# Create HF user
49RUN useradd -m -u 1000 user
50
51WORKDIR /home/user/app
52
53COPY requirements.txt .
54
55RUN pip install --upgrade pip && \
56    pip install -r requirements.txt
57
58# Install browser only — DO NOT run install-deps on HF Spaces
59RUN python -m playwright install chromium
60
61COPY . .
62
63RUN chown -R user:user /home/user/app /home/user/.cache
64
65USER user
66
67EXPOSE 7860
68
69CMD ["python", "run.py"]