coollsd commited on
Commit
87be28d
1 Parent(s): 75abeb6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -5
Dockerfile CHANGED
@@ -1,10 +1,19 @@
1
  FROM python:3.9
2
 
3
- WORKDIR /app
 
 
 
4
 
5
- COPY requirements.txt .
6
- RUN pip install --no-cache-dir -r requirements.txt
7
 
8
- COPY . .
 
9
 
10
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
1
  FROM python:3.9
2
 
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
6
+ ENV PYTHONUNBUFFERED=1
7
 
8
+ WORKDIR /code
 
9
 
10
+ COPY --chown=user ./requirements.txt /code/requirements.txt
11
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
13
+ COPY --chown=user . /code/
14
+
15
+ USER root
16
+ RUN chmod +x /code/start.sh
17
+ USER user
18
+
19
+ CMD ["/bin/bash", "/code/start.sh"]