Fercor95mx commited on
Commit
47dee1e
·
verified ·
1 Parent(s): 94c76cc

Update Dockerfile

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