DM / Dockerfile
Ourking's picture
Upload 5 files
5077cab verified
Raw History Blame Contribute Delete
480 Bytes
FROM python:3.10-slim
ENV TZ=Asia/Shanghai
WORKDIR /app
# 关键:补 OpenCV 缺的系统依赖(解决 libxcb.so.1 报错)
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-pip gcc \
libxcb1 libgl1 libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# 安装python依赖
RUN pip3 install --no-cache-dir \
opencv-python numpy flask requests
# 数据集权限
RUN chmod -R 777 /data || true
COPY . .
EXPOSE 7860
CMD ["python3", "app.py"]