mirror of
https://github.com/immich-app/immich.git
synced 2024-11-15 18:08:48 -07:00
1e748864c5
* updated dockerfile, added typing, packaging apply env change * added arm64 support * added ml version pump, second try for arm64 * added linting config to pyproject.toml * renamed ml input field * fixed linter config * fixed dev docker compose
27 lines
734 B
Docker
27 lines
734 B
Docker
FROM python:3.11 as builder
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_NO_CACHE_DIR=true
|
|
|
|
RUN pip install --upgrade pip && pip install poetry
|
|
RUN poetry config installer.max-workers 10 && \
|
|
poetry config virtualenvs.create false
|
|
RUN python -m venv /opt/venv
|
|
ENV VIRTUAL_ENV="/opt/venv" PATH="/opt/venv/bin:${PATH}"
|
|
|
|
COPY poetry.lock pyproject.toml ./
|
|
RUN poetry install --sync --no-interaction --no-ansi --no-root --only main
|
|
|
|
FROM python:3.11-slim
|
|
WORKDIR /usr/src/app
|
|
ENV NODE_ENV=production \
|
|
TRANSFORMERS_CACHE=/cache \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PATH="/opt/venv/bin:$PATH" \
|
|
PYTHONPATH=`pwd`
|
|
|
|
COPY --from=builder /opt/venv /opt/venv
|
|
COPY app .
|
|
ENTRYPOINT ["python", "main.py"]
|