(docker) only install default models when running the container against a new runtime directory

This commit is contained in:
Eugene Brodsky 2023-06-26 18:01:22 -04:00
parent 6fbd643948
commit 3b1eeda4d4

View File

@ -25,13 +25,13 @@ usermod -u ${USER_ID} ${USER} 1>/dev/null
configure() { configure() {
# Configure the runtime directory # Configure the runtime directory
if [[ -f ${INVOKEAI_ROOT}/invokeai.yaml ]]; then if [[ -f ${INVOKEAI_ROOT}/invokeai.yaml ]]; then
echo "${INVOKEAI_ROOT}/invokeai.yaml found." echo "${INVOKEAI_ROOT}/invokeai.yaml exists. InvokeAI is already configured."
echo "To reconfigure InvokeAI, please delete it." echo "To reconfigure InvokeAI, delete the above file."
echo "===========================================" echo "======================================================================"
else else
mkdir -p ${INVOKEAI_ROOT} mkdir -p ${INVOKEAI_ROOT}
chown --recursive ${USER} ${INVOKEAI_ROOT} chown --recursive ${USER} ${INVOKEAI_ROOT}
gosu ${USER} invokeai-configure --yes gosu ${USER} invokeai-configure --yes --default_only
fi fi
} }