Commit 1cd8db47 authored by Artem Baranovskyi's avatar Artem Baranovskyi
Browse files

Image build is optimized.

parent 0dda9f3c
...@@ -14,13 +14,17 @@ ENV PATH="/opt/myenv/bin:$PATH" ...@@ -14,13 +14,17 @@ ENV PATH="/opt/myenv/bin:$PATH"
WORKDIR /app WORKDIR /app
COPY . /app COPY . /app
COPY ./asyst /app/asyst COPY ./asyst /app/asyst
COPY requirements.txt .
# Install dependencies # Install dependencies in separate steps to reduce memory usage
RUN /opt/myenv/bin/pip install -r /app/requirements.txt \ RUN /opt/myenv/bin/pip install torch \
&& /opt/myenv/bin/pip install Flask \
&& /opt/myenv/bin/pip install matplotlib \
&& /opt/myenv/bin/pip install scikit-learn \
&& /opt/myenv/bin/pip install transformers \
&& /opt/myenv/bin/pip install pandas \
&& /opt/myenv/bin/pip install sentence_transformers \
&& /opt/myenv/bin/python3 -m pip install --upgrade setuptools wheel && /opt/myenv/bin/python3 -m pip install --upgrade setuptools wheel
# Final image # Final image
FROM python:3.10-slim FROM python:3.10-slim
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment