Files
IOPaint/docker/GPUDockerfile
let5sne 0363f84028 🐳 更新 Docker 配置到最新项目状态
- 更新 build_docker.sh 到新仓库地址
  - 仓库: Sanster/lama-cleaner → let5sne/IOPaint
  - 镜像标签: cwq1913/lama-cleaner → let5sne/iopaint
  - 项目名称: lama-cleaner → IOPaint

- 重构 Dockerfile (CPU & GPU)
  - 从源码构建替代 PyPI 安装
  - 更新基础镜像到最新版本
  - CPU: python:3.11-slim-bookworm
  - GPU: nvidia/cuda:12.1.0-runtime-ubuntu22.04
  - 使用最新的 PyTorch 和依赖版本
  - 添加自动启动命令

- 更新 scripts/pack.sh
  - 构建目录: lama-cleaner → iopaint
  - 修复拼写错误 (Ensuer → Ensure)

- 新增 docker/README.md
  - 完整的 Docker 部署指南
  - 包含 CPU 和 GPU 两种模式
  - Docker Compose 配置示例
  - 故障排查和安全建议

主要改进:
-  与当前项目完全同步
- 📦 支持从源码构建
- 🔧 更灵活的运行配置
- 📝 完整的使用文档
- 🚀 更新的依赖版本

🤖 Generated with Claude Code
2025-11-28 17:34:53 +00:00

34 lines
964 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common \
libsm6 libxext6 ffmpeg libfontconfig1 libxrender1 libgl1-mesa-glx \
curl python3-pip python3-dev git gcc build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --upgrade pip
# 安装最新的 PyTorchCUDA 12.1
RUN pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu121
WORKDIR /app
# 复制项目文件
COPY requirements.txt requirements-dev.txt setup.py main.py ./
COPY iopaint ./iopaint
COPY web_app ./web_app
# 安装依赖
RUN pip3 install -r requirements.txt && \
pip3 install -e .
# 安装插件依赖
RUN iopaint install-plugins-packages || true
EXPOSE 8080
# 默认启动命令GPU 模式)
CMD ["python3", "main.py", "start", "--model", "lama", "--device", "cuda", "--port", "8080", "--host", "0.0.0.0"]