Spaces:
Sleeping
Sleeping
| #Dockerfile | |
| FROM python:3.13-slim | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| WORKDIR /app | |
| # Try and run pip command after setting the user with `USER user` to avoid permission issues with Python | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright | |
| RUN mkdir -p /ms-playwright | |
| RUN python -m playwright install --with-deps chromium | |
| RUN chmod -R a+rX /ms-playwright | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| COPY --chown=user . /app | |
| EXPOSE 7860 | |
| ENV PYTHONUNBUFFERED=1 | |
| RUN chmod -R a+rX /ms-playwright || true | |
| # RUN uvicorn app_gui:app --host 0.0.0.0 --port $PORT | |
| CMD ["uvicorn", "app_gui:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers" , "--forwarded-allow-ips=*"] |