From 7c69c66af9ac488d5a2882cab1278bd662ba2ddf Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Sun, 3 Nov 2024 14:47:28 +0100 Subject: [PATCH] Feat: pre-install all requirements in the docker image 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 --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index 3f942aa8e..443c65755 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,16 @@ FROM ghcr.io/music-assistant/base:$BASE_IMAGE_VERSION ARG MASS_VERSION ARG TARGETPLATFORM ADD dist dist + +# pre-install ALL requirements +# comes at a cost of a slightly larger image size but is faster to start +# and has less dependencies to install at runtime +COPY requirements_all.txt . +RUN uv pip install \ + --no-cache \ + --find-links "https://wheels.home-assistant.io/musllinux/" \ + -r requirements_all.txt + # Install Music Assistant from prebuilt wheel RUN uv pip install \ --no-cache \