Sanster / IOPaint

Image inpainting tool powered by SOTA AI Model. Remove any unwanted object, defect, people from your pictures or erase and replace(powered by stable diffusion) any thing on your pictures.

Home Page:https://www.iopaint.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] CANT RUN THE DOCKER IMAGE

OmarAboRabea1 opened this issue · comments

I ran this script build_docker.sh but I still have an Error when I run the docker image:
docker run -p 8080:8080 --rm cwq1913/lama-cleaner:cpu-1.2.2 python3 main.py --device=cpu --port=8080 -- host 0.0.0.0

ERROR: ld.so: object '/usr/local/lib/python3.10/site-packages/skimage/_shared/../../scikit_image.libs/libgomp-d22c30c5.so.1.0.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
python3: can't open file '//main.py': [Errno 2] No such file or directory

Not the author of the project, but the docker build for lama-cleaner already was a little outdated and now with rename to IOPaint it has not been updated yet.

Here you can see, how I use it: https://github.com/AlmightyFrog/Dockerfiles/blob/main/iopaint/Dockerfile

Feel free to copy the Dockerfile and build yourself.
You also could directly use the Github Actions built image ghcr.io/almightyfrog/iopaint there. it is rebuilt weekly automatically to keep OS up to date and eventually IOPaint released versions itself, but e.g. torch version is fixed.

@AlmightyFrog do you know if theres an option with the dockerFile to enable all plugins and models with GPU? trying to figure this out with your dockerFile there thank you for sharing since this repo's Dockerfile is outdated

You should be pretty much just need to change the line where torch is installed for the correct version.
Following the README.md i guess you just need to use instead of
RUN pip3 install torch==2.1.2 torchvision --extra-index-url https://download.pytorch.org/whl/cpu
something like
RUN pip3 install torch==2.1.2 torchvision==0.16.2 --index-url https://download.pytorch.org/whl/cu118 for cuda or RUN pip3 install torch==2.1.2 torchvision==0.16.2 --index-url https://download.pytorch.org/whl/rocm5.6 for ROCm.