timestamp / Dockerfile
3v324v23's picture
update docker file
31db4cf
raw
history blame contribute delete
543 Bytes
FROM python:3.10-slim
WORKDIR /app
# Cài system libs cần cho OpenCV headless + torch
RUN apt-get update && apt-get install -y \
libglib2.0-0 \
libsm6 \
libxrender1 \
libxext6 \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip
# Torch CPU
RUN pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app ./app
EXPOSE 7860
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]