seanpedrickcase commited on
Commit
71761cb
1 Parent(s): bffbd2b

Modified Dockerfile to run with user 1000. Changed port to standard 7860 and removed server name specification.

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -17,7 +17,7 @@ COPY requirements.txt .
17
  RUN pip install -r requirements.txt
18
 
19
  # Set up a new user named "user" with user ID 1000
20
- #RUN useradd -m -u 1000 user
21
 
22
  # Change ownership of /home/user directory
23
  #RUN chown -R user:user /home/user
@@ -26,7 +26,7 @@ RUN pip install -r requirements.txt
26
  #RUN mkdir -p /home/user/tmp && chown -R user:user /home/user/tmp
27
 
28
  # Switch to the "user" user
29
- #USER user
30
 
31
  # Set home to the user's home directory
32
  ENV HOME=/home/user \
@@ -35,8 +35,8 @@ ENV HOME=/home/user \
35
  PYTHONUNBUFFERED=1 \
36
  GRADIO_ALLOW_FLAGGING=never \
37
  GRADIO_NUM_PORTS=1 \
38
- GRADIO_SERVER_NAME=0.0.0.0 \
39
- GRADIO_SERVER_PORT=7861 \
40
  GRADIO_THEME=huggingface \
41
  #GRADIO_TEMP_DIR=$HOME/tmp \
42
  #GRADIO_ROOT_PATH=/address-match \
@@ -46,7 +46,7 @@ ENV HOME=/home/user \
46
  WORKDIR $HOME/app
47
 
48
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
49
- #COPY --chown=user . $HOME/app
50
- COPY . $HOME/app
51
 
52
  CMD ["python", "app.py"]
 
17
  RUN pip install -r requirements.txt
18
 
19
  # Set up a new user named "user" with user ID 1000
20
+ RUN useradd -m -u 1000 user
21
 
22
  # Change ownership of /home/user directory
23
  #RUN chown -R user:user /home/user
 
26
  #RUN mkdir -p /home/user/tmp && chown -R user:user /home/user/tmp
27
 
28
  # Switch to the "user" user
29
+ USER user
30
 
31
  # Set home to the user's home directory
32
  ENV HOME=/home/user \
 
35
  PYTHONUNBUFFERED=1 \
36
  GRADIO_ALLOW_FLAGGING=never \
37
  GRADIO_NUM_PORTS=1 \
38
+ #GRADIO_SERVER_NAME=0.0.0.0 \
39
+ GRADIO_SERVER_PORT=7860 \
40
  GRADIO_THEME=huggingface \
41
  #GRADIO_TEMP_DIR=$HOME/tmp \
42
  #GRADIO_ROOT_PATH=/address-match \
 
46
  WORKDIR $HOME/app
47
 
48
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
49
+ COPY --chown=user . $HOME/app
50
+ #COPY . $HOME/app
51
 
52
  CMD ["python", "app.py"]