shiveshnavin commited on
Commit
98259f3
·
1 Parent(s): 0cfa31a

Update docker

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -3
Dockerfile CHANGED
@@ -1,8 +1,15 @@
1
  FROM python:3.10-slim
 
 
 
 
 
2
  WORKDIR /app
3
- COPY requirements.txt /app/
4
  RUN apt install cmake
5
- RUN pip install --no-cache-dir -r requirements.txt
6
- COPY . /app/
 
 
 
7
  EXPOSE 7860
8
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
+
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
6
+
7
  WORKDIR /app
 
8
  RUN apt install cmake
9
+
10
+ COPY --chown=user ./requirements.txt /app/requirements.txt
11
+ RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
12
+ COPY --chown=user . /app
13
+
14
  EXPOSE 7860
15
  CMD ["python", "app.py"]