Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim-bookworm | |
| RUN apt-get update && apt-get install -y \ | |
| wget gnupg ca-certificates git \ | |
| libnss3 libatk-bridge2.0-0 libgtk-3-0 \ | |
| libgbm-dev libasound2 libglib2.0-0 \ | |
| libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \ | |
| libxcursor1 libxdamage1 libxext6 libxfixes3 \ | |
| libxi6 libxrandr2 libxrender1 libxtst6 \ | |
| libpango-1.0-0 libpangocairo-1.0-0 libxss1 \ | |
| libdrm2 libxkbcommon0 fonts-liberation \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright | |
| RUN playwright install-deps chromium | |
| RUN playwright install chromium | |
| RUN chmod -R 755 /ms-playwright | |
| COPY . . | |
| RUN mkdir -p data | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--reload"] | |