ahmetoner / whisper-asr-webservice

OpenAI Whisper ASR Webservice API
https://ahmetoner.github.io/whisper-asr-webservice
MIT License
1.86k stars 332 forks source link

Invalid path for `cache-whisper` volume under macOS in docker-compose. #138

Closed banagale closed 9 months ago

banagale commented 9 months ago

This line of docker-compose.yml:

      - cache-whisper:~/.cache/whisper

Seems to be valid under linux, but fails as invalid under macOS:

Error response from daemon: invalid mount config for type "volume": invalid mount path: '~/.cache/whisper' mount path must be absolute

I changed it out for:

      - cache-whisper:${HOME}/.cache/whisper

I haven't tested it on linux, but this syntax supposedly covers mac and linux in docker 3+.

Handling various windows docker-compose run methods seems to require additional muckery, and I don't have a way to test that so leaving it out.

If you agree with this change / want it in, lmk and I'd be happy to provide a PR for this one liner.

ayancey commented 9 months ago

It would be nice to implement a fix if we could, but I'm not sure I understand. Are you talking about Docker Desktop? Since that uses a Linux VM I don't really know how running docker-compose directly on the mac to control the underlying VM works. This could be an issue with your Docker Desktop settings.

ahmetoner commented 9 months ago

Hey @banagale, can you try following path?

      - cache-whisper:/root/.cache/whisper
banagale commented 9 months ago

@ayancey I am running the compose from within pycharm.

The command it executes is:

/usr/local/bin/docker-compose -f /Users/xyz/code/pdq/whisper-asr-webservice/docker-compose.yml -p whisper-asr-webservice up -d

@ahmetoner

That works. I tried this initially, so it would be parallel to the other paths.

I thought perhaps you had wanted to try and get at the user's home folder, though.