From a3b9a0be3a9b2b06636a547282580c11c085ac29 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 22 Feb 2023 10:53:59 -0600 Subject: [PATCH] fix(server): Flask not found (#1830) * fix(server): Flask not found * trial 1 --- machine-learning/Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/machine-learning/Dockerfile b/machine-learning/Dockerfile index 7759ad4c35..ac646a9e0c 100644 --- a/machine-learning/Dockerfile +++ b/machine-learning/Dockerfile @@ -1,11 +1,16 @@ FROM python:3.10 ENV TRANSFORMERS_CACHE=/cache +ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONUNBUFFERED 1 WORKDIR /usr/src/app -RUN pip install --user --no-cache-dir torch==1.13.1+cpu -f https://download.pytorch.org/whl/torch_stable.html -RUN pip install --user transformers tqdm numpy scikit-learn scipy nltk sentencepiece flask Pillow -RUN pip install --user --no-deps sentence-transformers +RUN python -m venv /opt/venv +ENV PATH="/opt/venv/bin:$PATH" + +RUN pip install --no-cache-dir torch==1.13.1+cpu -f https://download.pytorch.org/whl/torch_stable.html +RUN pip install transformers tqdm numpy scikit-learn scipy nltk sentencepiece flask Pillow +RUN pip install --no-deps sentence-transformers COPY . .