Skip to content

Commit 42c2dea

Browse files
committed
fix(docker): change 'nvidia' profile name to 'cuda'
1 parent b672cc3 commit 42c2dea

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

docker/.env.sample

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
## INVOKEAI_PORT is the port on which the InvokeAI web interface will be available
2020
# INVOKEAI_PORT=9090
2121

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
2424

2525
## 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.
2627
# CONTAINER_UID=1000

docker/docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Copyright (c) 2023 Eugene Brodsky https://github.com/ebr
22

3-
version: '3.8'
4-
53
x-invokeai: &invokeai
64
image: "local/invokeai:latest"
75
build:
@@ -32,7 +30,7 @@ x-invokeai: &invokeai
3230

3331

3432
services:
35-
invokeai-nvidia:
33+
invokeai-cuda:
3634
<<: *invokeai
3735
deploy:
3836
resources:

docker/run.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ run() {
88
local build_args=""
99
local profile=""
1010

11+
# create .env file if it doesn't exist, otherwise docker compose will fail
1112
touch .env
13+
14+
# parse .env file for build args
1215
build_args=$(awk '$1 ~ /=[^$]/ && $0 !~ /^#/ {print "--build-arg " $0 " "}' .env) &&
1316
profile="$(awk -F '=' '/GPU_DRIVER/ {print $2}' .env)"
1417

15-
[[ -z "$profile" ]] && profile="nvidia"
18+
# default to 'cuda' profile
19+
[[ -z "$profile" ]] && profile="cuda"
1620

1721
local service_name="invokeai-$profile"
1822

0 commit comments

Comments
 (0)