mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
8107d354d9
also switch to python 3.9:slim since it has a ton less security issues
31 lines
954 B
Bash
Executable File
31 lines
954 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# How to use: https://invoke-ai.github.io/InvokeAI/installation/INSTALL_DOCKER/#run-the-container
|
|
# IMPORTANT: You need to have a token on huggingface.co to be able to download the checkpoints!!!
|
|
|
|
cd "$(dirname "$0")" || exit 1
|
|
|
|
source ./env.sh
|
|
|
|
echo -e "You are using these values:\n"
|
|
echo -e "Volumename:\t${VOLUMENAME}"
|
|
echo -e "Invokeai_tag:\t${INVOKEAI_TAG}"
|
|
echo -e "local Models:\t${MODELSPATH:-unset}\n"
|
|
|
|
docker run \
|
|
--interactive \
|
|
--tty \
|
|
--rm \
|
|
--platform="$PLATFORM" \
|
|
--name="${REPOSITORY_NAME,,}" \
|
|
--hostname="${REPOSITORY_NAME,,}" \
|
|
--mount=source="$VOLUMENAME",target=/data \
|
|
${MODELSPATH:+-u "$(id -u):$(id -g)"} \
|
|
${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 \
|
|
--cap-add=sys_nice \
|
|
${GPU_FLAGS:+--gpus=${GPU_FLAGS}} \
|
|
"$INVOKEAI_TAG" ${1:+$@}
|