2023-06-25 20:03:02 +00:00
|
|
|
# Copyright (c) 2023 Eugene Brodsky https://github.com/ebr
|
|
|
|
|
2023-10-30 20:53:02 +00:00
|
|
|
x-invokeai: &invokeai
|
2023-06-25 20:03:02 +00:00
|
|
|
image: "local/invokeai:latest"
|
|
|
|
build:
|
|
|
|
context: ..
|
|
|
|
dockerfile: docker/Dockerfile
|
|
|
|
|
|
|
|
# Create a .env file in the same directory as this docker-compose.yml file
|
|
|
|
# and populate it with environment variables. See .env.sample
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
|
2024-03-20 17:48:39 +00:00
|
|
|
# variables without a default will automatically inherit from the host environment
|
|
|
|
environment:
|
|
|
|
# if set, CONTAINER_INVOKEAI_ROOT will override the Invoke runtime directory location *inside* the container
|
|
|
|
- INVOKEAI_ROOT=${CONTAINER_INVOKEAI_ROOT:-/invokeai}
|
|
|
|
- HF_HOME
|
2023-06-25 20:03:02 +00:00
|
|
|
ports:
|
2024-03-20 20:36:44 +00:00
|
|
|
- "${INVOKEAI_PORT:-9090}:${INVOKEAI_PORT:-9090}"
|
2023-06-25 20:03:02 +00:00
|
|
|
volumes:
|
2024-01-02 13:17:57 +00:00
|
|
|
- type: bind
|
|
|
|
source: ${HOST_INVOKEAI_ROOT:-${INVOKEAI_ROOT:-~/invokeai}}
|
2024-03-20 17:48:39 +00:00
|
|
|
target: ${CONTAINER_INVOKEAI_ROOT:-/invokeai}
|
|
|
|
bind:
|
|
|
|
create_host_path: true
|
2023-06-25 20:03:02 +00:00
|
|
|
- ${HF_HOME:-~/.cache/huggingface}:${HF_HOME:-/invokeai/.cache/huggingface}
|
|
|
|
tty: true
|
|
|
|
stdin_open: true
|
|
|
|
|
2023-10-30 20:53:02 +00:00
|
|
|
|
|
|
|
services:
|
2024-06-24 20:56:07 +00:00
|
|
|
invokeai-cuda:
|
2023-10-30 20:53:02 +00:00
|
|
|
<<: *invokeai
|
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
reservations:
|
|
|
|
devices:
|
|
|
|
- driver: nvidia
|
|
|
|
count: 1
|
|
|
|
capabilities: [gpu]
|
|
|
|
|
2023-12-07 16:17:11 +00:00
|
|
|
invokeai-cpu:
|
|
|
|
<<: *invokeai
|
|
|
|
profiles:
|
|
|
|
- cpu
|
|
|
|
|
2023-10-30 20:53:02 +00:00
|
|
|
invokeai-rocm:
|
|
|
|
<<: *invokeai
|
|
|
|
devices:
|
|
|
|
- /dev/kfd:/dev/kfd
|
|
|
|
- /dev/dri:/dev/dri
|
2023-12-07 16:17:11 +00:00
|
|
|
profiles:
|
|
|
|
- rocm
|