Spaces:
Runtime error
Runtime error
| FROM python:3.10-slim | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y \ | |
| wget \ | |
| gnupg \ | |
| libnss3 \ | |
| libnspr4 \ | |
| libatk1.0-0 \ | |
| libatk-bridge2.0-0 \ | |
| libcups2 \ | |
| libdrm2 \ | |
| libxkbcommon0 \ | |
| libxcomposite1 \ | |
| libxdamage1 \ | |
| libxext6 \ | |
| libxfixes3 \ | |
| libxrandr2 \ | |
| libgbm1 \ | |
| libpango-1.0-0 \ | |
| libcairo2 \ | |
| libasound2 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| RUN mkdir -p /etc/apt/keyrings \ | |
| && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /etc/apt/keyrings/google-chrome.gpg \ | |
| && echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \ | |
| && apt-get update && apt-get install -y google-chrome-stable \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN playwright install chromium | |
| COPY . . | |
| EXPOSE 7860 | |
| #CMD ["python", "main.py"] | |
| #Start | |
| CMD while true; do python main.py; sleep 3600; done | |