Vaibhav84 commited on
Commit
0a941fe
·
1 Parent(s): 97cb0e9
Files changed (1) hide show
  1. Dockerfile +12 -5
Dockerfile CHANGED
@@ -1,12 +1,19 @@
1
  FROM python:3.9
2
- RUN useradd -m -u 1000 user
3
- USER user
4
  WORKDIR /code
5
 
6
  COPY ./requirements.txt /code/requirements.txt
7
- RUN chown -R user:user /code
8
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
9
 
10
- COPY . .
 
 
 
 
 
 
 
 
 
11
 
12
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.9
 
 
2
  WORKDIR /code
3
 
4
  COPY ./requirements.txt /code/requirements.txt
5
+
6
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
7
 
8
+ RUN useradd -m -u 1000 user
9
+
10
+ USER user
11
+
12
+ ENV HOME=/home/user \
13
+ PATH=/home/user/.local/bin:$PATH
14
+
15
+ WORKDIR $HOME/app
16
+
17
+ COPY --chown=user . $HOME/app
18
 
19
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]