From fb0085ad8aaf6a02cbd80b4c9f6ef8b0636b3d69 Mon Sep 17 00:00:00 2001 From: Julien Bouquillon Date: Wed, 13 Dec 2023 22:31:49 +0100 Subject: [PATCH] fix: docker rootless (#176) * Update Dockerfile * Update Dockerfile * fix: rootless * Update Dockerfile --- Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 542b622..6d5ae24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,9 +18,15 @@ RUN set -x \ ENV MODEL_NAME sentqam +RUN mkdir -p /models/sentqam/3 +RUN addgroup --system --gid 1000 docker && adduser --system --uid 1000 docker +RUN chown -R 1000:1000 /models/sentqam/3 + +USER 1000 + WORKDIR /models/sentqam/3 RUN curl -L https://tfhub.dev/google/universal-sentence-encoder-multilingual-qa/3?tf-hub-format=compressed --output sentqam.tar.gz RUN tar -zxf sentqam.tar.gz --directory ./ -USER 1234 \ No newline at end of file +