# projtex: hosted projection-texturing API (REST + MCP). CPU-only: rendering uses Mesa's software OpenGL # (llvmpipe) through EGL; image generation runs on the official Qwen / Fibo ZeroGPU Spaces. FROM python:3.12-slim ENV DEBIAN_FRONTEND=noninteractive \ PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ EGL_PLATFORM=surfaceless \ LIBGL_ALWAYS_SOFTWARE=1 \ PROJTEX_GL_BACKEND=egl RUN apt-get update && apt-get install -y --no-install-recommends \ libegl1 libgl1 libegl-mesa0 libgl1-mesa-dri libgles2 libgbm1 libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* RUN useradd -m -u 1000 user USER user ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH WORKDIR /home/user/app COPY --chown=user requirements.txt . RUN pip install --no-cache-dir --user -r requirements.txt COPY --chown=user . . EXPOSE 7860 CMD ["python", "-m", "uvicorn", "app.server:app", "--host", "0.0.0.0", "--port", "7860", \ "--proxy-headers", "--forwarded-allow-ips", "*", "--timeout-keep-alive", "75"]