Yusin commited on
Commit
76d71ba
1 Parent(s): a415226

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -1,15 +1,20 @@
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
  FROM ultrafunk/undetected-chromedriver:latest
6
 
7
  WORKDIR /code
8
 
 
 
9
  COPY ./requirements.txt /code/requirements.txt
10
 
11
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
13
  COPY . .
14
 
 
 
 
 
15
  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 ultrafunk/undetected-chromedriver:latest
5
 
6
  WORKDIR /code
7
 
8
+ RUN addgroup -S appgroup && adduser -S yusin -G appgroup
9
+
10
  COPY ./requirements.txt /code/requirements.txt
11
 
12
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
13
 
14
  COPY . .
15
 
16
+ RUN chown yusin:appgroup /code/main.py
17
+
18
+ USER yusin
19
+
20
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]