update readme

This commit is contained in:
Qing 2022-10-08 12:55:51 +08:00
parent fd7c47bb95
commit 724b8c232d
2 changed files with 38 additions and 4 deletions

View File

@ -11,6 +11,9 @@
<a href="https://colab.research.google.com/drive/1e3ZkAJxvkK3uzaTGu91N9TvI_Mahs0Wb?usp=sharing">
<img alt="Open in Colab" src="https://colab.research.google.com/assets/colab-badge.svg" />
</a>
<a href="https://hub.docker.com/r/cwq1913/lama-cleaner">
<img alt="version" src="https://img.shields.io/docker/pulls/cwq1913/lama-cleaner" />
</a>
</p>
![img](./assets/dark.jpg)
@ -181,16 +184,21 @@ The cache directories for different models correspond as follows:
docker run -p 8080:8080 \
-v /path/to/torch_cache:/root/.cache/torch \
-v /path/to/huggingface_cache:/root/.cache/huggingface \
--rm lamacleaner \
--rm lama-cleaner:cpu-0.21.0 \
lama-cleaner --device=cpu --port=8080 --host=0.0.0.0
```
### Run Docker (gpu)
- cuda11.6
- pytorch1.12.1
- minimum nvidia driver 510.39.01+
```
docker run --gpus all -p 8080:8080 \
-v /path/to/torch_cache:/root/.cache/torch \
-v /path/to/huggingface_cache:/root/.cache/huggingface \
--rm lama-cleaner:cpu-0.21.0 \
lama-cleaner --device=cuda --port=8080 --host=0.0.0.0
```
@ -206,9 +214,6 @@ docker build -f ./docker/CPUDockerfile -t lamacleaner .
gpu & cpu
- cuda11.6
- pytorch1.12.1
```
docker build -f ./docker/GPUDockerfile -t lamacleaner .
```

29
build_docker.sh Normal file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e
GIT_TAG=`git describe --tags --abbrev=0`
IMAGE_DESC="Image inpainting tool powered by SOTA AI Model"
GIT_REPO="https://github.com/Sanster/lama-cleaner"
echo "Building cpu docker image..."
docker buildx build \
--file ./docker/CPUDockerfile \
--label org.opencontainers.image.title=lama-cleaner \
--label org.opencontainers.image.description="$IMAGE_DESC" \
--label org.opencontainers.image.url=$GIT_REPO \
--label org.opencontainers.image.source=$GIT_REPO \
--label org.opencontainers.image.version=$GIT_TAG \
--tag lama-cleaner:cpu-$GIT_TAG .
echo "Building NVIDIA GPU docker image..."
docker buildx build \
--file ./docker/GPUDockerfile \
--label org.opencontainers.image.title=lama-cleaner \
--label org.opencontainers.image.description="$IMAGE_DESC" \
--label org.opencontainers.image.url=$GIT_REPO \
--label org.opencontainers.image.source=$GIT_REPO \
--label org.opencontainers.image.version=$GIT_TAG \
--tag lama-cleaner:gpu-$GIT_TAG .