diff --git a/README.md b/README.md index cb8265b..16107f8 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ Open in Colab + + version +

![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 . ``` diff --git a/build_docker.sh b/build_docker.sh new file mode 100644 index 0000000..9a68de2 --- /dev/null +++ b/build_docker.sh @@ -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 .