rahulreshma commited on
Commit
71c4ea0
·
verified ·
1 Parent(s): 44a7952

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
  #FROM nvidia/cuda:12.5.1-cudnn-devel-ubuntu20.04
2
  FROM ubuntu:latest
 
3
  ENV DEBIAN_FRONTEND=noninteractive \
4
  TZ=Europe/Paris
5
 
@@ -42,8 +43,7 @@ WORKDIR /app
42
  # Create a non-root user and switch to it
43
  RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
44
  && chown -R user:user /app
45
- RUN adduser user sudo
46
- RUN echo "%sudo ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers
47
  USER user
48
 
49
  # All users can use /home/user as their home directory
@@ -84,7 +84,7 @@ RUN mkdir /data && chown user:user /data
84
  # End root user section
85
  #######################################
86
 
87
- #USER user
88
 
89
  # Python packages
90
  RUN --mount=target=requirements.txt,source=requirements.txt \
@@ -104,5 +104,5 @@ ENV PYTHONUNBUFFERED=1 \
104
  GRADIO_THEME=huggingface \
105
  SYSTEM=spaces \
106
  SHELL=/bin/bash
107
- RUN echo $(whoami)
108
- CMD ["./start_server.sh"]
 
1
  #FROM nvidia/cuda:12.5.1-cudnn-devel-ubuntu20.04
2
  FROM ubuntu:latest
3
+
4
  ENV DEBIAN_FRONTEND=noninteractive \
5
  TZ=Europe/Paris
6
 
 
43
  # Create a non-root user and switch to it
44
  RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
45
  && chown -R user:user /app
46
+ RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
 
47
  USER user
48
 
49
  # All users can use /home/user as their home directory
 
84
  # End root user section
85
  #######################################
86
 
87
+ #USER root
88
 
89
  # Python packages
90
  RUN --mount=target=requirements.txt,source=requirements.txt \
 
104
  GRADIO_THEME=huggingface \
105
  SYSTEM=spaces \
106
  SHELL=/bin/bash
107
+
108
+ CMD ["./start_server.sh"]