From 8825c46687d0c7fa2666fc7db6a7d57f2a67389f Mon Sep 17 00:00:00 2001
From: Artem Baranovskyi <artem.baranovsky1980@gmail.com>
Date: Mon, 6 Jan 2025 23:11:10 +0200
Subject: [PATCH] Image build is optimized.

---
 flask_ml_api/Dockerfile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/flask_ml_api/Dockerfile b/flask_ml_api/Dockerfile
index 8fde6ba..19bf108 100755
--- a/flask_ml_api/Dockerfile
+++ b/flask_ml_api/Dockerfile
@@ -1,4 +1,3 @@
-# Этап сборки
 FROM pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime as build
 
 RUN apt-get update && apt-get install -y curl
@@ -6,6 +5,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh
 RUN sh rustup-init.sh -y --default-toolchain none
 RUN ~/.cargo/bin/rustup toolchain install stable --profile minimal --no-self-update
 
+ENV PATH="$PATH:$HOME/.cargo/bin"
+
 RUN rustup --version
 RUN cargo --version
 
@@ -37,4 +38,4 @@ RUN chown -R www-data:www-data /app && chmod -R 755 /app
 
 EXPOSE 5000
 
-CMD ["/opt/myenv/bin/python", "/app/api.py"]
+CMD ["/opt/myenv/bin/python", "/app/api.py"]
\ No newline at end of file
-- 
GitLab