Download Dockerfile from lze888lze/HF-API: direct link, hf CLI and curl.
- Browser
- Download file 400 Bytes
-
https://huggingface.co/spaces/lze888lze/HF-API/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/lze888lze/HF-API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/lze888lze/HF-API/resolve/main/Dockerfile
400 Bytes
| FROM python:3.10-slim | |
| WORKDIR /home/user/app | |
| # 安装系统依赖(OpenCV需要) | |
| RUN apt-get update && apt-get install -y --no-install-recommends libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/* | |
| # 先复制依赖文件,利用Docker缓存 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 复制应用代码 | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["python", "-u", "main.py"] | |