From 106c7aa95620dbf19cddae840a207bec1a10c5a9 Mon Sep 17 00:00:00 2001 From: mauwii Date: Thu, 9 Feb 2023 02:48:12 +0100 Subject: [PATCH] bindmount outputs directory to ./docker/outputs --- docker/run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/run.sh b/docker/run.sh index eebb533078..9d28d70d89 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -8,6 +8,9 @@ cd "$SCRIPTDIR" || exit 1 source ./env.sh +# Create outputs directory if it does not exist +[[ -d ./outputs ]] || mkdir ./outputs + echo -e "You are using these values:\n" echo -e "Volumename:\t${VOLUMENAME}" echo -e "Invokeai_tag:\t${CONTAINER_IMAGE}" @@ -21,7 +24,7 @@ docker run \ --name="${REPOSITORY_NAME,,}" \ --hostname="${REPOSITORY_NAME,,}" \ --mount=source="${VOLUMENAME}",target=/data \ - ${MODELSPATH:+--user "$(id -u):$(id -g)"} \ + --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 \