gruhit-patel commited on
Commit
12377b8
1 Parent(s): 1c6906e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -2
Dockerfile CHANGED
@@ -1,9 +1,15 @@
 
 
 
1
  FROM python:3.11
2
 
3
- COPY . .
 
4
 
5
- WORKDIR /
6
 
 
7
  RUN pip install --no-cache-dir --upgrade -r backend_requirements.txt
8
 
 
9
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
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.11
5
 
6
+ RUN useradd -m -u 1000 user
7
+ USER user
8
 
9
+ WORKDIR /app
10
 
11
+ COPY --chown=user ./backend_requirements.txt backend_requirements.txt
12
  RUN pip install --no-cache-dir --upgrade -r backend_requirements.txt
13
 
14
+ COPY --chown=user . /app
15
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]