Spaces:
Paused
Paused
File size: 686 Bytes
e3ac2ea 1b7f275 8c84b88 085c519 8c84b88 1b7f275 e3ac2ea 1b7f275 2d3428c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | FROM python:3.11-slim
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# ติดตั้ง System Dependencies สำหรับ OpenCV และการประมวลผลรูปภาพ
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
libxcb1 \
libx11-6 \
libsm6 \
libxext6 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /code
ENV UV_PYTHON=python3.11
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
COPY . /code
ENV PATH="/code/.venv/bin:$PATH"
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--access-log", "--log-level", "info"] |