matatonic / openedai-speech

An OpenAI API compatible text to speech server using Coqui AI's xtts_v2 and/or piper tts as the backend.
GNU Affero General Public License v3.0
398 stars 49 forks source link

Nvidia gpu was not detected until I set runtime: nvidia #49

Open thiswillbeyourgithub opened 1 month ago

thiswillbeyourgithub commented 1 month ago

https://github.com/matatonic/openedai-speech/blob/09b1c051e10cfbbbb48bdbff09ffa71536c2c8d4/docker-compose.yml#L13

Hi, just adding runtime: nvidia under this line fixed my nvidia gpu detection issue so maybe it would be worth mentionning it at least as a commented line for other struggling users :)

Edit: just noticed that it was removed on purpose so yeah I think leaving a comment would be nice and understand that it's not actually missing

matatonic commented 1 month ago

Yeah, this is fairly new behaviour, but the better way to do this on linux is to set it as the default runtime, ex. in /etc/docker/daemon.json:

{
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    },
    "default-runtime": "nvidia"
}

Which is really a docker setup thing, not an app setup - but I admit it was confusing for me also. Using the command line docker to run it also requires --gpus all, which has similar effect of enabling the gpu access.

This is not required on windows (it's enabled automatically).

Probably deserves a FAQ item.