From ec1de5ae8b5ffc920e920a72dd912b5d6d54293c Mon Sep 17 00:00:00 2001 From: mauwii Date: Sun, 26 Feb 2023 00:51:30 +0100 Subject: [PATCH] more detailed volume parameters --- docker/run.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/run.sh b/docker/run.sh index c52ccb4c4d..d685788146 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -21,10 +21,10 @@ docker run \ --tty \ --rm \ --platform="${PLATFORM}" \ - --name="${REPOSITORY_NAME,,}" \ - --hostname="${REPOSITORY_NAME,,}" \ - --mount=source="${VOLUMENAME}",target=/data \ - --mount type=bind,source="$(pwd)"/outputs,target=/data/outputs \ + --name="${REPOSITORY_NAME}" \ + --hostname="${REPOSITORY_NAME}" \ + --mount type=volume,volume-driver=local,source="${VOLUMENAME}",target=/data \ + --mount type=bind,source="$(pwd)"/outputs/,target=/data/outputs/ \ ${MODELSPATH:+--mount="type=bind,source=${MODELSPATH},target=/data/models"} \ ${HUGGING_FACE_HUB_TOKEN:+--env="HUGGING_FACE_HUB_TOKEN=${HUGGING_FACE_HUB_TOKEN}"} \ --publish=9090:9090 \ @@ -32,7 +32,7 @@ docker run \ ${GPU_FLAGS:+--gpus="${GPU_FLAGS}"} \ "${CONTAINER_IMAGE}" ${@:+$@} -# Remove Trash folder +echo -e "\nCleaning trash folder ..." for f in outputs/.Trash*; do if [ -e "$f" ]; then rm -Rf "$f"