File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 3434env :
3535 PYTHON_VERSION : " 3.12"
3636 BASE_IMAGE_VERSION_STABLE : " 1.3.1"
37- BASE_IMAGE_VERSION_BETA : " 1.4.4 "
38- BASE_IMAGE_VERSION_NIGHTLY : " 1.4.4 "
37+ BASE_IMAGE_VERSION_BETA : " 1.4.5 "
38+ BASE_IMAGE_VERSION_NIGHTLY : " 1.4.5 "
3939
4040jobs :
4141 preflight-checks :
Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ COPY requirements_all.txt .
1111# ensure UV is installed
1212COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
1313
14+ # Install build tools for PyAV compilation (for aioresonate)
15+ RUN apt-get update && apt-get install -y --no-install-recommends \
16+ gcc \
17+ g++ \
18+ python3-dev \
19+ && rm -rf /var/lib/apt/lists/*
20+
1421# create venv which will be copied to the final image
1522ENV VIRTUAL_ENV=/app/venv
1623RUN uv venv $VIRTUAL_ENV
@@ -21,6 +28,11 @@ RUN uv venv $VIRTUAL_ENV
2128RUN uv pip install \
2229 -r requirements_all.txt
2330
31+ # Reinstall PyAV from source to use system FFmpeg instead of bundled FFmpeg
32+ # Use the version already resolved by requirements_all.txt to ensure compatibility
33+ RUN uv pip install --no-binary av --force-reinstall --no-deps \
34+ "av==$($VIRTUAL_ENV/bin/python -c 'import importlib.metadata; print(importlib.metadata.version(" av"))')"
35+
2436# Install Music Assistant from prebuilt wheel
2537ARG MASS_VERSION
2638RUN uv pip install \
Original file line number Diff line number Diff line change @@ -155,6 +155,8 @@ RUN set -x \
155155 libflac12 \
156156 libavahi-client3 \
157157 libavahi-common3 \
158+ # pkg-config needed for PyAV (for aioresonate) to find system FFmpeg
159+ pkg-config \
158160 && apt-get clean \
159161 && rm -rf /var/lib/apt/lists/*
160162
@@ -179,6 +181,13 @@ COPY --from=ffmpeg-builder /usr/local/lib/libav*.so* /usr/local/lib/
179181COPY --from=ffmpeg-builder /usr/local/lib/libsw*.so* /usr/local/lib/
180182COPY --from=ffmpeg-builder /usr/local/lib/libpostproc.so* /usr/local/lib/
181183
184+ # Copy FFmpeg headers and pkg-config files needed for PyAV compilation (adds around 2 MB)
185+ COPY --from=ffmpeg-builder /usr/local/include/ /usr/local/include/
186+ COPY --from=ffmpeg-builder /usr/local/lib/pkgconfig/ /usr/local/lib/pkgconfig/
187+
188+ # Set PKG_CONFIG_PATH so pkg-config can find FFmpeg
189+ ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
190+
182191# Update shared library cache and verify FFmpeg
183192RUN ldconfig && ffmpeg -version && ffprobe -version
184193
You can’t perform that action at this time.
0 commit comments