Skip to content

Commit

Permalink
switch docker base back to debian
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Jan 14, 2025
1 parent bf80db5 commit f9450f2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ ADD dist dist
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 \
--find-links "https://wheels.home-assistant.io/musllinux/" \
"music-assistant@dist/music_assistant-${MASS_VERSION}-py3-none-any.whl"

# Set some labels
Expand Down
41 changes: 25 additions & 16 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,51 @@

# BASE docker image for music assistant container

FROM python:3.12-alpine3.20
FROM python:3.13-bookworm

ARG TARGETPLATFORM


RUN set -x \
&& apk add --no-cache \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
jemalloc \
curl \
git \
wget \
tzdata \
libsox-fmt-all \
libsox3 \
ffmpeg \
sox \
openssl \
cifs-utils \
# install ffmpeg from community repo
&& apk add --no-cache ffmpeg --repository=https://dl-cdn.alpinelinux.org/alpine/v3.20/community \
# install snapcast from community repo
&& apk add --no-cache snapcast --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \
# install libnfs from community repo
&& apk add --no-cache libnfs --repository=https://dl-cdn.alpinelinux.org/alpine/v3.20/community \
# install openssl-dev (needed for airplay)
&& apk add --no-cache openssl-dev
libnfs-utils \
libjemalloc2 \
# install snapcast server 0.28 from bookworm backports
&& bash -c 'echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list' \
&& apt-get update \
&& apt-get install -y --no-install-recommends -t bookworm-backports snapserver \
# cleanup
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*


# Copy widevine client files to container
RUN mkdir -p /usr/local/bin/widevine_cdm
COPY widevine_cdm/* /usr/local/bin/widevine_cdm/

WORKDIR /app

# Configure runtime environmental variables
ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2"
ENV VIRTUAL_ENV=/app/venv
# Enable jemalloc
RUN \
export LD_PRELOAD="$(find /usr/lib/ -name *libjemalloc.so.2)" \
export MALLOC_CONF="background_thread:true,metadata_thp:auto,dirty_decay_ms:20000,muzzy_decay_ms:20000"

# create python venv
RUN python3 -m venv $VIRTUAL_ENV && \
source $VIRTUAL_ENV/bin/activate && \
ENV VIRTUAL_ENV=/app/venv
RUN python -m venv $VIRTUAL_ENV && \
bash -c 'source $VIRTUAL_ENV/bin/activate' && \
pip install --upgrade pip \
&& pip install uv==0.4.17

Expand Down

0 comments on commit f9450f2

Please sign in to comment.