From aee745d1f7e3b0721a5d33ce759a0b91956b1b4e Mon Sep 17 00:00:00 2001
From: Artem Baranovskyi <artem.baranovsky1980@gmail.com>
Date: Mon, 6 Jan 2025 18:07:29 +0200
Subject: [PATCH] Image build is optimized.

---
 flask_ml_api/Dockerfile | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/flask_ml_api/Dockerfile b/flask_ml_api/Dockerfile
index 0c49c58..8944451 100755
--- a/flask_ml_api/Dockerfile
+++ b/flask_ml_api/Dockerfile
@@ -12,15 +12,18 @@ ENV PATH="/opt/myenv/bin:$PATH"
 WORKDIR /app
 COPY . /app
 
-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
-
-RUN rm -rf /root/.cache/pip
+RUN pip install --no-cache-dir Flask matplotlib scikit-learn transformers pandas sentence_transformers && \
+    pip install --no-cache-dir --upgrade setuptools wheel && \
+    rm -rf /root/.cache/pip \
+
+#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
+#RUN rm -rf /root/.cache/pip
 
 
 FROM pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime
-- 
GitLab