ARG BASE_IMAGE_VERSION=latest
FROM ghcr.io/music-assistant/base:$BASE_IMAGE_VERSION AS builder
+ADD dist dist
+COPY requirements_all.txt .
+
+# ensure UV is installed
+COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# create venv which will be copied to the final image
ENV VIRTUAL_ENV=/app/venv
RUN uv venv $VIRTUAL_ENV
-ADD dist dist
-COPY requirements_all.txt .
-
# pre-install ALL requirements into the venv
# comes at a cost of a slightly larger image size but is faster to start
# because we do not have to install dependencies at runtime
-# ensure UV is installed
-COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN uv pip install \
--find-links "https://wheels.home-assistant.io/musllinux/" \
-r requirements_all.txt