jibsn commited on
Commit
dadbe98
·
verified ·
1 Parent(s): 50baf65

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -1
Dockerfile CHANGED
@@ -20,7 +20,16 @@ RUN pip cache purge \
20
  && rm -rf /root/.cache/pip \
21
  && rm -rf /app/requirements.txt
22
 
23
- COPY --chown=root . /app
 
 
 
 
 
 
 
 
 
24
  EXPOSE 7860
25
  ENV GRADIO_SERVER_NAME="0.0.0.0"
26
 
 
20
  && rm -rf /root/.cache/pip \
21
  && rm -rf /app/requirements.txt
22
 
23
+ RUN useradd -m -u 1000 user
24
+ USER user
25
+ # Set home to the user's home directory
26
+ ENV HOME=/home/user \
27
+ PATH=/home/user/.local/bin:$PATH
28
+
29
+ WORKDIR $HOME/app
30
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
31
+ COPY --chown=user . $HOME/app
32
+
33
  EXPOSE 7860
34
  ENV GRADIO_SERVER_NAME="0.0.0.0"
35