skander101 commited on
Commit
dfde933
·
1 Parent(s): a96145c

Fix Dockerfile: single-stage build

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -6
Dockerfile CHANGED
@@ -1,12 +1,9 @@
1
- FROM python:3.12-slim AS builder
2
- WORKDIR /app
3
- COPY requirements.txt .
4
- RUN pip install --no-cache-dir -r requirements.txt
5
-
6
  FROM python:3.12-slim
7
  WORKDIR /app
8
  RUN addgroup --system app && adduser --system --group app
9
- COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
 
 
10
  COPY . .
11
  USER app
12
  EXPOSE 7860
 
 
 
 
 
 
1
  FROM python:3.12-slim
2
  WORKDIR /app
3
  RUN addgroup --system app && adduser --system --group app
4
+ COPY requirements.txt .
5
+ RUN pip install --no-cache-dir -r requirements.txt && \
6
+ rm -rf /root/.cache/pip
7
  COPY . .
8
  USER app
9
  EXPOSE 7860