Spaces:
Running
Running
| # =============== Sovereign UIKitV3 Automator Dockerfile v3 (2026) =============== | |
| FROM python:3.11-slim-bookworm | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PLAYWRIGHT_BROWSERS_PATH=/home/appuser/.cache/ms-playwright \ | |
| HF_HUB_ENABLE_HF_TRANSFER=1 \ | |
| GRADIO_SERVER_NAME=0.0.0.0 \ | |
| GRADIO_SERVER_PORT=7860 | |
| RUN useradd -m -s /bin/bash appuser && \ | |
| apt-get update && apt-get install -y --no-install-recommends \ | |
| ca-certificates wget gnupg curl git build-essential libglib2.0-0 \ | |
| libnss3 libnspr4 libdbus-1-3 libatk1.0-0 libatk-bridge2.0-0 \ | |
| libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 \ | |
| libxrandr2 libgbm1 libasound2 && \ | |
| rm -rf /var/lib/apt/lists/* | |
| WORKDIR /home/appuser/app | |
| COPY requirements.txt . | |
| RUN pip install --upgrade --no-cache-dir pip && \ | |
| pip install --no-cache-dir -r requirements.txt && \ | |
| playwright install --with-deps chromium | |
| COPY . . | |
| RUN chown -R appuser:appuser /home/appuser && \ | |
| chmod -R 755 /home/appuser/app | |
| USER appuser | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ | |
| CMD curl -f http://localhost:7860 || exit 1 | |
| CMD ["python", "app.py"] |