diff --git a/pyinfra/framework/deploy.py b/pyinfra/framework/deploy.py index f2fe7eb..57cd15a 100644 --- a/pyinfra/framework/deploy.py +++ b/pyinfra/framework/deploy.py @@ -503,9 +503,14 @@ files.directory( ) files.directory( name="Kokoro models dir", + # The kokoro-fastapi image runs as UID 1000 (non-root) and downloads + # models into this dir on first start. Has to be writable by 1000; + # 2775 root:docker isn't enough since the container isn't in the + # docker group. Owning it as 1000:1000 matches the image's user. path=f"{COMPOSE_DIR}/kokoro/models", - group="docker", - mode="2775", + user="1000", + group="1000", + mode="0755", _sudo=True, )