Update Dockerfile
Browse files- Dockerfile +5 -19
Dockerfile
CHANGED
@@ -7,25 +7,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
7 |
python3-dev \
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
10 |
-
|
11 |
-
ENV PATH="/home/user/.local/bin:${PATH}" \
|
12 |
-
PYTHONUNBUFFERED=1 \
|
13 |
-
PYTHONDONTWRITEBYTECODE=1 \
|
14 |
-
PORT=7860 \
|
15 |
-
TIMEOUT=300
|
16 |
|
17 |
-
|
18 |
-
RUN
|
19 |
-
chown -R user:user /app
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
COPY --chown=user requirements.txt .
|
25 |
-
RUN pip install --no-cache-dir --user gunicorn==20.1.0 && \
|
26 |
-
pip install --no-cache-dir --user -r requirements.txt
|
27 |
-
|
28 |
-
COPY --chown=user . .
|
29 |
-
|
30 |
-
# Comando ottimizzato
|
31 |
-
CMD ["gunicorn", "--bind", "0.0.0.0:${PORT}", "--timeout", "${TIMEOUT}", "app:app"]
|
|
|
7 |
python3-dev \
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
10 |
+
RUN pip install --no-cache-dir gunicorn==20.1.0
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
COPY requirements.txt .
|
13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
14 |
|
15 |
+
COPY . .
|
16 |
|
17 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "300", "app:app"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|