From 04a3f5afbca5ac9c474e99addedbd99986cbfcfa Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Wed, 11 Dec 2024 09:46:19 +0000 Subject: [PATCH] Set appuser after installation --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a757e9..5e3a356 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,5 @@ FROM python:3.10-slim -RUN groupadd --gid 1000 appuser \ - && useradd --uid 1000 --gid 1000 -ms /bin/bash appuser - RUN pip3 install --no-cache-dir --upgrade \ pip \ virtualenv @@ -12,8 +9,7 @@ RUN apt-get update && apt-get install -y \ software-properties-common \ git -USER appuser -ENV VIRTUAL_ENV=/home/appuser/venv + ENV VIRTUAL_ENV=/home/venv COPY . /home/appuser/document-to-podcast WORKDIR /home/appuser/document-to-podcast @@ -23,5 +19,10 @@ RUN . ${VIRTUAL_ENV}/bin/activate && pip install torch torchaudio --index-url ht RUN . ${VIRTUAL_ENV}/bin/activate && pip install /home/appuser/document-to-podcast RUN . ${VIRTUAL_ENV}/bin/activate && python demo/download_models.py +RUN groupadd --gid 1000 appuser \ + && useradd --uid 1000 --gid 1000 -ms /bin/bash appuser + +USER appuser + EXPOSE 8501 ENTRYPOINT ["./demo/run.sh"]