SoUmNerd commited on
Commit
4065676
1 Parent(s): 0af081b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -8
Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
  FROM nvidia/cuda:11.3.1-base-ubuntu20.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive \
4
- TZ=Europe/Paris
5
 
6
  # Remove any third-party apt sources to avoid issues with expiring keys.
7
  # Install some basic utilities
@@ -102,12 +102,15 @@ RUN --mount=target=/root/packages.txt,source=packages.txt \
102
  && rm -rf /var/lib/apt/lists/*
103
 
104
  RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
105
- bash /root/on_startup.sh
106
 
107
  #######################################
108
  # End root user section
109
  #######################################
110
 
 
 
 
111
  USER user
112
 
113
  # Python packages
@@ -120,12 +123,12 @@ COPY --chown=user . $HOME/app
120
  RUN chmod +x start_server.sh
121
 
122
  ENV PYTHONUNBUFFERED=1 \
123
- GRADIO_ALLOW_FLAGGING=never \
124
- GRADIO_NUM_PORTS=1 \
125
- GRADIO_SERVER_NAME=0.0.0.0 \
126
- GRADIO_THEME=huggingface \
127
- SYSTEM=spaces \
128
- SHELL=/bin/bash
129
 
130
  EXPOSE 7860 3000
131
 
 
1
  FROM nvidia/cuda:11.3.1-base-ubuntu20.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive \
4
+ TZ=Europe/Paris
5
 
6
  # Remove any third-party apt sources to avoid issues with expiring keys.
7
  # Install some basic utilities
 
102
  && rm -rf /var/lib/apt/lists/*
103
 
104
  RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
105
+ bash /root/on_startup.sh
106
 
107
  #######################################
108
  # End root user section
109
  #######################################
110
 
111
+ # Add the user 'user' to the sudo group
112
+ RUN usermod -aG sudo user
113
+
114
  USER user
115
 
116
  # Python packages
 
123
  RUN chmod +x start_server.sh
124
 
125
  ENV PYTHONUNBUFFERED=1 \
126
+ GRADIO_ALLOW_FLAGGING=never \
127
+ GRADIO_NUM_PORTS=1 \
128
+ GRADIO_SERVER_NAME=0.0.0.0 \
129
+ GRADIO_THEME=huggingface \
130
+ SYSTEM=spaces \
131
+ SHELL=/bin/bash
132
 
133
  EXPOSE 7860 3000
134