alanchen1115 commited on
Commit
dc1bdf7
1 Parent(s): c838af4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -1,7 +1,9 @@
1
  FROM python:3.9
2
- COPY . .
3
-
4
- WORKDIR /
5
-
6
- RUN pip install --no-cache-dir --upgrade -r /requirements.txt
 
 
7
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.9
2
+ WORKDIR /code
3
+ COPY ./requirements.txt /code/requirements.txt
4
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
5
+ RUN useradd -m -u 1000 user
6
+ USER user
7
+ WORKDIR $HOME/app
8
+ COPY --chown=user . $HOME/app
9
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]