osanseviero MoritzLaurer HF staff commited on
Commit
c23e88c
1 Parent(s): e0c15f9

specify user uid = 1000 based on dev mode docs: https://huggingface.co/dev-mode-explorers (#8)

Browse files

- specify user uid = 1000 based on dev mode docs: https://huggingface.co/dev-mode-explorers (4a6c48253c611ed41a017fa83afa2250f85f26ac)


Co-authored-by: Moritz Laurer <[email protected]>

Files changed (1) hide show
  1. Dockerfile +3 -2
Dockerfile CHANGED
@@ -38,7 +38,8 @@ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
38
  WORKDIR /app
39
 
40
  # Create a non-root user and switch to it
41
- RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
 
42
  && chown -R user:user /app
43
  RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
44
  USER user
@@ -88,7 +89,7 @@ RUN --mount=target=requirements.txt,source=requirements.txt \
88
  pip install --no-cache-dir --upgrade -r requirements.txt
89
 
90
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
91
- COPY --chown=user . $HOME/app
92
 
93
  RUN chmod +x start_server.sh
94
 
 
38
  WORKDIR /app
39
 
40
  # Create a non-root user and switch to it
41
+ #RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
42
+ RUN adduser --uid 1000 --disabled-password --gecos '' --shell /bin/bash user \
43
  && chown -R user:user /app
44
  RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
45
  USER user
 
89
  pip install --no-cache-dir --upgrade -r requirements.txt
90
 
91
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
92
+ COPY --link --chown=user . $HOME/app
93
 
94
  RUN chmod +x start_server.sh
95