Elalimy commited on
Commit
91db0ec
1 Parent(s): 456f64d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -1,14 +1,16 @@
 
 
 
1
  FROM python:3.9
2
 
3
- WORKDIR /code
4
 
5
- COPY ./requirements.txt /code/requirements.txt
6
 
7
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
- COPY . .
10
 
11
- CMD ["gunicorn","-b", "0.0.0.0:7860","app:app"]
12
 
13
- RUN mkdir -p /.cache/huggingface/hub \
14
- && chmod -R 777 /.cache/huggingface
 
1
+ # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
  FROM python:3.9
5
 
6
+ RUN useradd -m -u 1000 user
7
 
8
+ WORKDIR /app
9
 
10
+ COPY --chown=user ./requirements.txt requirements.txt
11
 
12
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
13
 
14
+ COPY --chown=user . /app
15
 
16
+ CMD ["gunicorn","-b", "0.0.0.0:7860","app:app"]