From d029ebacb0915f1fa98c4a516f274cdd5868db8b Mon Sep 17 00:00:00 2001 From: John Collier Date: Wed, 17 Jul 2024 12:40:47 -0400 Subject: [PATCH 1/2] Set group permissions on whispercpp app folder Signed-off-by: John Collier --- model_servers/whispercpp/base/Containerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/model_servers/whispercpp/base/Containerfile b/model_servers/whispercpp/base/Containerfile index fa9dff1e..543c9e53 100644 --- a/model_servers/whispercpp/base/Containerfile +++ b/model_servers/whispercpp/base/Containerfile @@ -20,5 +20,9 @@ COPY --from=mwader/static-ffmpeg:6.1.1 /ffmpeg /bin/ COPY --from=mwader/static-ffmpeg:6.1.1 /ffprobe /bin/ COPY src /app/ + +RUN chgrp -R 0 /app && chmod -R g=u /app +USER 1001 + ENV AUDIO_FILE=/app/jfk.wav ENTRYPOINT ["sh", "run.sh"] From 86433985f056ea157d85f9a6a4d9e5104e1b11b7 Mon Sep 17 00:00:00 2001 From: John Collier Date: Thu, 18 Jul 2024 09:49:45 -0400 Subject: [PATCH 2/2] Use COPY --chown instead Signed-off-by: John Collier --- model_servers/whispercpp/base/Containerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/model_servers/whispercpp/base/Containerfile b/model_servers/whispercpp/base/Containerfile index 543c9e53..1dc3bdd2 100644 --- a/model_servers/whispercpp/base/Containerfile +++ b/model_servers/whispercpp/base/Containerfile @@ -19,9 +19,8 @@ COPY --from=builder /app /app COPY --from=mwader/static-ffmpeg:6.1.1 /ffmpeg /bin/ COPY --from=mwader/static-ffmpeg:6.1.1 /ffprobe /bin/ -COPY src /app/ +COPY --chown=0:0 --chmod=755 src /app -RUN chgrp -R 0 /app && chmod -R g=u /app USER 1001 ENV AUDIO_FILE=/app/jfk.wav