1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 08:31:59 +00:00
immich/machine-learning/Dockerfile

30 lines
778 B
Docker
Raw Normal View History

FROM python:3.10 as builder
ENV PYTHONDONTWRITEBYTECODE=1 \
2023-04-26 10:39:24 +00:00
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=true
RUN python -m venv /opt/venv
RUN /opt/venv/bin/pip install torch --index-url https://download.pytorch.org/whl/cpu
2023-04-26 10:39:24 +00:00
RUN /opt/venv/bin/pip install transformers tqdm numpy scikit-learn scipy nltk sentencepiece fastapi Pillow uvicorn[standard]
RUN /opt/venv/bin/pip install --no-deps sentence-transformers
2023-05-17 17:07:17 +00:00
# Facial Recognition Stuff
RUN /opt/venv/bin/pip install insightface onnxruntime
2023-04-26 10:39:24 +00:00
FROM python:3.10-slim
ENV NODE_ENV=production
COPY --from=builder /opt/venv /opt/venv
ENV TRANSFORMERS_CACHE=/cache \
2023-04-26 10:39:24 +00:00
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PATH="/opt/venv/bin:$PATH"
WORKDIR /usr/src/app
COPY . .
2023-04-26 10:39:24 +00:00
ENV PYTHONPATH=`pwd`
2023-05-03 19:27:35 +00:00
CMD ["python", "src/main.py"]