| FROM debian:bookworm-20260223-slim |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| ca-certificates \ |
| bash \ |
| libglib2.0-0 \ |
| libgl1 \ |
| libsm6 \ |
| libxext6 \ |
| libxrender1 \ |
| libx11-6 \ |
| libxcb1 \ |
| libgomp1 \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv |
|
|
| ENV PATH="/root/.local/bin:${PATH}" \ |
| PYTHONDONTWRITEBYTECODE=1 \ |
| PYTHONUNBUFFERED=1 |
|
|
| |
| RUN uv venv /opt/gateway --python 3.12 && \ |
| uv pip install --python /opt/gateway/bin/python \ |
| "pdf2zh-next" \ |
| "fastapi>=0.115" \ |
| "uvicorn[standard]>=0.32" \ |
| "httpx>=0.28" \ |
| "python-multipart" \ |
| "bcrypt" \ |
| "itsdangerous" |
|
|
| |
| COPY src /src |
| COPY entrypoint.sh /entrypoint.sh |
| RUN chmod +x /entrypoint.sh |
|
|
| EXPOSE 7860 |
|
|
| CMD ["/entrypoint.sh"] |
|
|