feat: add opencut/io-paint/clash

This commit is contained in:
Sun-ZhenXing
2025-09-26 09:16:53 +08:00
parent 0b74e7bbe8
commit ed43eef637
17 changed files with 231 additions and 11 deletions

1
src/io-paint/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/models

18
src/io-paint/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime
ARG DEBIAN_FRONTEND=noninteractive
ARG VERSION=1.6.0
WORKDIR /workspace
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
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install --upgrade pip
RUN pip3 install iopaint==${VERSION} && pip3 cache purge
EXPOSE 8080
CMD ["iopaint", "start", "--model=lama", "--device=cuda", "--port=8080", "--host=0.0.0.0"]

3
src/io-paint/README.md Normal file
View File

@@ -0,0 +1,3 @@
# IOPaint
Ref: [Dockerfile](https://github.com/Sanster/IOPaint/blob/main/docker/GPUDockerfile)

View File

@@ -0,0 +1,39 @@
x-default: &default
restart: unless-stopped
volumes:
- &localtime /etc/localtime:/etc/localtime:ro
- &timezone /etc/timezone:/etc/timezone:ro
logging:
driver: json-file
options:
max-size: 100m
services:
lama-cleaner:
<<: *default
image: ${DOCKER_REGISTRY:-docker.io}/local/lama-cleaner:${BUILD_VERSION:-latest}
ports:
- 8080:8080
build:
context: .
dockerfile: Dockerfile
# environment:
# HF_ENDPOINT: https://hf-mirror.com
volumes:
- *localtime
- *timezone
- ./models:/root/.cache
command:
- iopaint
- start
- --model=lama
- --device=cuda
- --port=8080
- --host=0.0.0.0
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [compute, utility]