File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 19
19
# # INVOKEAI_PORT is the port on which the InvokeAI web interface will be available
20
20
# INVOKEAI_PORT=9090
21
21
22
- # # GPU_DRIVER can be set to either `nvidia ` or `rocm` to enable GPU support in the container accordingly.
23
- # GPU_DRIVER=nvidia #| rocm
22
+ # # GPU_DRIVER can be set to either `cuda ` or `rocm` to enable GPU support in the container accordingly.
23
+ # GPU_DRIVER=cuda #| rocm
24
24
25
25
# # CONTAINER_UID can be set to the UID of the user on the host system that should own the files in the container.
26
+ # # It is usually not necessary to change this. Use `id -u` on the host system to find the UID.
26
27
# CONTAINER_UID=1000
Original file line number Diff line number Diff line change 1
1
# Copyright (c) 2023 Eugene Brodsky https://github.com/ebr
2
2
3
- version : ' 3.8'
4
-
5
3
x-invokeai : &invokeai
6
4
image : " local/invokeai:latest"
7
5
build :
@@ -32,7 +30,7 @@ x-invokeai: &invokeai
32
30
33
31
34
32
services :
35
- invokeai-nvidia :
33
+ invokeai-cuda :
36
34
<< : *invokeai
37
35
deploy :
38
36
resources :
Original file line number Diff line number Diff line change @@ -8,11 +8,15 @@ run() {
8
8
local build_args=" "
9
9
local profile=" "
10
10
11
+ # create .env file if it doesn't exist, otherwise docker compose will fail
11
12
touch .env
13
+
14
+ # parse .env file for build args
12
15
build_args=$( awk ' $1 ~ /=[^$]/ && $0 !~ /^#/ {print "--build-arg " $0 " "}' .env) &&
13
16
profile=" $( awk -F ' =' ' /GPU_DRIVER/ {print $2}' .env) "
14
17
15
- [[ -z " $profile " ]] && profile=" nvidia"
18
+ # default to 'cuda' profile
19
+ [[ -z " $profile " ]] && profile=" cuda"
16
20
17
21
local service_name=" invokeai-$profile "
18
22
You can’t perform that action at this time.
0 commit comments