dvwn commited on
Commit
0a045e1
·
verified ·
1 Parent(s): 794fab4

Update Dockerfile

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