diff --git a/docker/.env.sample b/docker/.env.sample index a9be746d63..70ecee0338 100644 --- a/docker/.env.sample +++ b/docker/.env.sample @@ -2,10 +2,13 @@ ## Any environment variables supported by InvokeAI can be specified here, ## in addition to the examples below. -# INVOKEAI_ROOT is the path to a path on the local filesystem where InvokeAI will store data. +# HOST_INVOKEAI_ROOT is the path on the docker host's filesystem where InvokeAI will store data. # Outputs will also be stored here by default. -# This **must** be an absolute path. -INVOKEAI_ROOT= +# If relative, it will be relative to the docker directory in which the docker-compose.yml file is located +#HOST_INVOKEAI_ROOT=../../invokeai-data + +# INVOKEAI_ROOT is the path to the root of the InvokeAI repository within the container. +# INVOKEAI_ROOT=~/invokeai # Get this value from your HuggingFace account settings page. # HUGGING_FACE_HUB_TOKEN= diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index b6a965d120..c368eeb56d 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -21,7 +21,9 @@ x-invokeai: &invokeai ports: - "${INVOKEAI_PORT:-9090}:9090" volumes: - - ${INVOKEAI_ROOT:-~/invokeai}:${INVOKEAI_ROOT:-/invokeai} + - type: bind + source: ${HOST_INVOKEAI_ROOT:-${INVOKEAI_ROOT:-~/invokeai}} + target: ${INVOKEAI_ROOT:-/invokeai} - ${HF_HOME:-~/.cache/huggingface}:${HF_HOME:-/invokeai/.cache/huggingface} # - ${INVOKEAI_MODELS_DIR:-${INVOKEAI_ROOT:-/invokeai/models}} # - ${INVOKEAI_MODELS_CONFIG_PATH:-${INVOKEAI_ROOT:-/invokeai/configs/models.yaml}}