Skip to content

Commit

Permalink
Set appuser after installation
Browse files Browse the repository at this point in the history
  • Loading branch information
daavoo committed Dec 11, 2024
1 parent 2c99563 commit 04a3f5a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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"]

0 comments on commit 04a3f5a

Please sign in to comment.