Skip to content

Conversation

@xrd
Copy link
Contributor

@xrd xrd commented Dec 14, 2022

This permits you to use GPUs by running the docker script like:

GPU_FLAGS="--gpus all" ./docker-build/run.sh

If you don't set the GPU_FLAGS it is ignored, and therefore does not affect running docker on the CPU for hosts without a GPU.

@mauwii
Copy link
Contributor

mauwii commented Dec 14, 2022

This does unfortunatelly not work on Apple Silicon:

docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

but since the script still works when this flag is not set it should be fine.

Copy link
Contributor

@mauwii mauwii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add this flag to the docs, with a short description when to use

@xrd
Copy link
Contributor Author

xrd commented Dec 14, 2022

This does unfortunatelly not work on Apple Silicon:

docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

but since the script still works when this flag is not set it should be fine.

I wonder if you can use something like --gpus mps and get it to work on Apple Silicon. I can try tomorrow on my M1.

Copy link
Contributor

@mauwii mauwii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thx for contributing!

@mauwii mauwii enabled auto-merge (squash) December 14, 2022 04:37
@mauwii
Copy link
Contributor

mauwii commented Dec 14, 2022

This does unfortunatelly not work on Apple Silicon:
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
but since the script still works when this flag is not set it should be fine.

I wonder if you can use something like --gpus mps and get it to work on Apple Silicon. I can try tomorrow on my M1.

good Idea, but unfortunatelly not:
invalid argument "mps" for "--gpus" flag: count must be an integer: strconv.Atoi: parsing "mps": invalid syntax

@mauwii mauwii merged commit 5d20f47 into invoke-ai:main Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants