From e5647b2cab30e9f79289824afedf031c28db79e9 Mon Sep 17 00:00:00 2001
From: Artem Baranovskyi <artem.baranovsky1980@gmail.com>
Date: Fri, 10 Jan 2025 21:27:53 +0200
Subject: [PATCH] Image build is optimized.

---
 flask_ml_api/Dockerfile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/flask_ml_api/Dockerfile b/flask_ml_api/Dockerfile
index 8bfd685..29aacf4 100755
--- a/flask_ml_api/Dockerfile
+++ b/flask_ml_api/Dockerfile
@@ -8,7 +8,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 RUN python3 -m venv /opt/myenv
 ENV PATH="/opt/myenv/bin:$PATH"
 
-RUN pip install --no-cache-dir Flask matplotlib scikit-learn transformers pandas sentence_transformers && \
+RUN pip install --no-cache-dir Flask && \
+    pip install --no-cache-dir matplotlib && \
+    pip install --no-cache-dir scikit-learn && \
+    pip install --no-cache-dir transformers && \
+    pip install --no-cache-dir pandas && \
+    pip install --no-cache-dir sentence_transformers && \
     pip install --no-cache-dir --upgrade setuptools wheel
 
 FROM base as build
-- 
GitLab