Download Dockerfile from Ourking/DM: direct link, hf CLI and curl.
- Browser
- Download file 480 Bytes
-
https://huggingface.co/spaces/Ourking/DM/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Ourking/DM/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Ourking/DM/resolve/main/Dockerfile
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"] | |