Sagar Thacker commited on
Commit
cda3fc0
·
1 Parent(s): 8db7ef3

updated dcokerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -0
Dockerfile CHANGED
@@ -13,4 +13,18 @@ COPY ["model.py", "app.py", "/code/"]
13
  COPY ["models", "/code/models/"]
14
  COPY ["data", "/code/data/"]
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  CMD ["gradio", "/code/app.py"]
 
13
  COPY ["models", "/code/models/"]
14
  COPY ["data", "/code/data/"]
15
 
16
+ # Set up a new user named "user" with user ID 1000
17
+ RUN useradd -m -u 1000 user
18
+ # Switch to the "user" user
19
+ USER user
20
+ # Set home to the user's home directory
21
+ ENV HOME=/home/user \
22
+ PATH=/home/user/.local/bin:$PATH
23
+
24
+ # Set the working directory to the user's home directory
25
+ WORKDIR $HOME/code
26
+
27
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
28
+ COPY --chown=user . $HOME/code
29
+
30
  CMD ["gradio", "/code/app.py"]