Use requirements.txt file to install python dependencies in ML image
This commit is contained in:
@@ -4,10 +4,11 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PIP_NO_CACHE_DIR=true
|
||||
|
||||
COPY requirements.txt ./
|
||||
|
||||
RUN python -m venv /opt/venv && \
|
||||
/opt/venv/bin/pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html && \
|
||||
/opt/venv/bin/pip install transformers tqdm numpy scikit-learn scipy nltk sentencepiece flask Pillow gunicorn && \
|
||||
/opt/venv/bin/pip install --no-deps sentence-transformers
|
||||
/opt/venv/bin/pip install --upgrade pip setuptools wheel && \
|
||||
/opt/venv/bin/pip install --no-deps -r requirements.txt
|
||||
|
||||
FROM python:3.10-slim
|
||||
|
||||
|
||||
Reference in New Issue
Block a user