#updating InvokeAI in via Docker
7 messages · Page 1 of 1 (latest)
Based on the information provided in the extracts, there isn't a direct instruction on how to update InvokeAI in Docker. However, there are some general steps you can follow:
- Pull the latest version of the InvokeAI Docker image from the Docker repository.
- Stop and remove the current running InvokeAI Docker container.
- Run a new Docker container using the latest image.
Please note that you should backup any important data before performing these steps.
For more specific instructions or if you encounter any issues, I recommend checking the official InvokeAI GitHub repository or their documentation for more detailed instructions or potential solutions to common problems.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@grim dirge kapa.ai is still learning and improving, please let us know how it did by reacting below
can you check if this script will do that, if not please suggests edits @stoic badge
#!/usr/bin/env bash
set -e -o pipefail
run() {
local scriptdir=$(dirname "${BASH_SOURCE[0]}")
cd "$scriptdir" || exit 1
local build_args=""
local profile=""
touch .env
build_args=$(awk '$1 ~ /=[^$]/ && $0 !~ /^#/ {print "--build-arg " $0 " "}' .env) &&
profile="$(awk -F '=' '/GPU_DRIVER/ {print $2}' .env)"
[[ -z "$profile" ]] && profile="nvidia"
local service_name="invokeai-$profile"
if [[ ! -z "$build_args" ]]; then
printf "%s\n" "docker compose build args:"
printf "%s\n" "$build_args"
fi
docker compose build $build_args
unset build_args
printf "%s\n" "starting service $service_name"
docker compose --profile "$profile" up -d "$service_name"
docker compose logs -f
}
run
Let me check the knowledge base for you. One moment! :books:
The script you provided seems to be for building and running a Docker service with a specific profile and build arguments. However, it doesn't seem to handle the update process for InvokeAI.
To update InvokeAI in Docker, you would typically pull the latest Docker image and recreate the container. Here's a simple script that could do that:
#!/usr/bin/env bash
# Define the image name
image_name="invokeai/invokeai:latest"
# Pull the latest image
docker pull $image_name
# Stop and remove the old container
docker stop invokeai_container
docker rm invokeai_container
# Run a new container with the latest image
docker run -d --name invokeai_container $image_name
Please replace "invokeai/invokeai:latest" with the correct Docker image name for InvokeAI. Also, replace "invokeai_container" with the name of your InvokeAI Docker container.
Remember to backup any important data before running this script, as it will remove the old container.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@grim dirge kapa.ai is still learning and improving, please let us know how it did by reacting below