Download Dockerfile from ISAAC1982/IOPaint: direct link, hf CLI and curl.
- Browser
- Download file 534 Bytes
-
https://huggingface.co/spaces/ISAAC1982/IOPaint/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ISAAC1982/IOPaint/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ISAAC1982/IOPaint/resolve/main/Dockerfile
534 Bytes
| FROM python:3.9 | |
| RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:${PATH}" | |
| WORKDIR /app | |
| COPY --chown=user requirements.txt ./requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # 预下载 lama 模型(参考别人的写法) | |
| RUN iopaint download --model lama | |
| COPY --chown=user . /app | |
| EXPOSE 8080 | |
| CMD ["iopaint", "start", "--model=lama", "--device=cpu", "--port=8080", "--host=0.0.0.0"] |