Skip to content

mimic3 Docker Image on Podman: PermissionError: [Errno 13] Permission denied: '/home/mimic3/.local/share/mycroft/mimic3/voices' #8

@georgmangold

Description

@georgmangold

Describe the bug
When using the Docker image with Podman, I get a permisson error when opening the local web page an site is not working.

To Reproduce

  1. Follow the instructions https://mycroft-ai.gitbook.io/docs/mycroft-technologies/mimic-tts/mimic-3#docker-image but with Podman

  2. Launch container with Podman from CLI
    2a .With local mount option
    $ podman run -it -p 127.0.0.1:59125:59125 -v /home/user/.local/share/mycroft/mimic3:/home/mimic3/.local/share/mycroft/mimic3 mycroftai/mimic3
    2b. OR without local mount
    $ podman run -it -p 127.0.0.1:59125:59125 mycroftai/mimic3

  3. Go to the local web page at http://localhost:59125/ and see the error message in the CLI

Expected behavior
No Error Message

Log files

$ podman run -it -p 127.0.0.1:59125:59125 -v /home/USER/.local/share/mycroft/mimic3:/home/mimic3/.local/share/mycroft/mimic3 mycroftai/mimic3
INFO:__main__:Starting web server
[2022-07-01 18:17:56 +0000] [1] [INFO] Running on http://0.0.0.0:59125 (CTRL + C to quit)
INFO:hypercorn.error:Running on http://0.0.0.0:59125 (CTRL + C to quit)
ERROR:mimic3_http.app:[Errno 13] Permission denied: '/home/mimic3/.local/share/mycroft/mimic3/voices'
Traceback (most recent call last):
  File "/home/mimic3/app/.venv/lib/python3.9/site-packages/quart/app.py", line 1512, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/home/mimic3/app/.venv/lib/python3.9/site-packages/quart/app.py", line 1557, in dispatch_request
    return await self.ensure_async(handler)(**request_.view_args)
  File "/home/mimic3/app/mimic3_http/app.py", line 241, in api_voices
    voices_by_key = {v.key: v for v in _MIMIC3.get_voices()}
  File "/home/mimic3/app/mimic3_http/app.py", line 241, in <dictcomp>
    voices_by_key = {v.key: v for v in _MIMIC3.get_voices()}
  File "/home/mimic3/app/mimic3_tts/tts.py", line 195, in get_voices
    for lang_dir in voices_dir.iterdir():
  File "/usr/lib/python3.9/pathlib.py", line 1149, in iterdir
    for name in self._accessor.listdir(self):
PermissionError: [Errno 13] Permission denied: '/home/mimic3/.local/share/mycroft/mimic3/voices'

Environment:

  • Device type: Laptop
  • OS: Fedora Silverblue 36
  • mycroftai/mimic3
  • Other versions: podman version 4.1.1

Additional context/ Workaround/ Fix:
I was able to fix the error by logging into the container as root, creating the directories, and setting the owner and group to mimic3

podman exec -u 0 -it sad_lalande bash
mkdir -p /home/mimic3/.local/share/mycroft/mimic3
chown -R mimic3:mimic3 .local

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions