FPTCheckInFastAPI / Dockerfile
Hoanha2101's picture
fix readme.md
af31c4b
Raw History Blame Contribute Delete
505 Bytes
FROM python:3.9
ENV CUDA_VISIBLE_DEVICES=-1
# Cài thêm libGL và các phụ thuộc
RUN apt-get update && apt-get install -y \
libgl1 \
libsm6 \
libxext6 \
libxrender1 \
&& rm -rf /var/lib/apt/lists/*
# Tạo user không root
RUN useradd -m -u 1000 user
WORKDIR /app
COPY --chown=user requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
COPY --chown=user . .
USER user
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]