HawkeyeHS commited on
Commit
011237d
·
1 Parent(s): 3c4fbb2

Modified Docker file

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -8,12 +8,17 @@ RUN mkdir -p /.cache/huggingface/hub && \
8
 
9
  COPY ./requirements.txt /code/requirements.txt
10
 
11
- RUN chown -R user:user /code
12
-
13
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
14
 
15
- COPY . .
 
 
 
 
 
16
 
17
- COPY --chown=user:user . /code
 
 
18
 
19
  CMD ["gunicorn","-b", "0.0.0.0:7860", "app:app"]
 
8
 
9
  COPY ./requirements.txt /code/requirements.txt
10
 
 
 
11
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
13
+ RUN useradd -m -u 1000 user
14
+ USER user
15
+ ENV HOME=/home/user \
16
+ PATH=/home/user/.local/bin:$PATH
17
+
18
+ WORKDIR $HOME/app
19
 
20
+ COPY --chown=user . $HOME/app
21
+
22
+ COPY . .
23
 
24
  CMD ["gunicorn","-b", "0.0.0.0:7860", "app:app"]