0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-07 00:50:23 -05:00

Use requirements.txt file to install python dependencies in ML image

This commit is contained in:
Olly Welch 2023-03-01 12:23:38 +00:00
parent cbe9289826
commit 32e706c7f3
2 changed files with 37 additions and 3 deletions

View file

@ -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

View file

@ -0,0 +1,33 @@
certifi==2022.12.7
charset-normalizer==3.0.1
click==8.1.3
filelock==3.9.0
Flask==2.2.3
gunicorn==20.1.0
huggingface-hub==0.12.1
idna==3.4
importlib-metadata==6.0.0
itsdangerous==2.1.2
Jinja2==3.1.2
joblib==1.2.0
MarkupSafe==2.1.2
nltk==3.8.1
numpy==1.24.2
packaging==23.0
Pillow==9.4.0
PyYAML==6.0
regex==2022.10.31
requests==2.28.2
scikit-learn==1.2.1
scipy==1.10.1
sentence-transformers==2.2.2
sentencepiece==0.1.97
threadpoolctl==3.1.0
tokenizers==0.13.2
torch==1.13.1 -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
tqdm==4.64.1
transformers==4.26.1
typing-extensions==4.5.0
urllib3==1.26.14
Werkzeug==2.2.3
zipp==3.15.0