From 7ae450a690711a969c9d9d4fef35cc8ffa5bacf4 Mon Sep 17 00:00:00 2001
From: Artem Baranovskyi <artem.baranovsky1980@gmail.com>
Date: Thu, 9 Jan 2025 22:32:01 +0200
Subject: [PATCH] Image build is optimized.

---
 flask_ml_api/Dockerfile | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/flask_ml_api/Dockerfile b/flask_ml_api/Dockerfile
index 7c23460..1f9f137 100755
--- a/flask_ml_api/Dockerfile
+++ b/flask_ml_api/Dockerfile
@@ -1,19 +1,14 @@
-# Этап сборки
 FROM pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime as build
 
-# Установка Rust и Cargo
 RUN apt-get update && apt-get install -y curl
 RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /usr/local/bin/rustup-init.sh
 RUN chmod +x /usr/local/bin/rustup-init.sh
 RUN /usr/local/bin/rustup-init.sh -y --default-toolchain none
 
-# Добавление пути к rustup и cargo в переменную окружения PATH
 ENV PATH="$PATH:/root/.cargo/bin"
 
-# Установка toolchain
 RUN /root/.cargo/bin/rustup toolchain install stable --profile minimal --no-self-update
 
-# Проверка установки Rust и Cargo
 RUN /root/.cargo/bin/rustup --version
 RUN /root/.cargo/bin/cargo --version
 
@@ -28,12 +23,10 @@ ENV PATH="/opt/myenv/bin:$PATH"
 WORKDIR /app
 COPY . /app
 
-# Установка пакетов Python
 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
 
-# Этап финального образа
 FROM pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime
 
 COPY --from=build /opt/myenv /opt/myenv
-- 
GitLab