From 8060a93ae85e99f857513d5823f2fb432a69928d Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 14 May 2024 11:11:46 -0500 Subject: [PATCH] fix: appropriate dependencies (#61) # Description Fixes the gradio audio input bug introduced in #51 # Issues Closes #59 Replaces #60 # Other Notes Breaks caching quite a bit, so if that's an issue we can create a helper image that we use to pull in dependencies. --- Dockerfile | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ee3a8b..110897e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,3 @@ -# Stage 1: Use a base image to install ffmpeg -FROM jrottenberg/ffmpeg:4.1 as ffmpeg-base - -# Stage 2: Build the final image FROM python:3.8-slim # Label for vendor @@ -14,10 +10,8 @@ ARG EXTRAS ENV OVOS_CONFIG_BASE_FOLDER=neon \ OVOS_CONFIG_FILENAME=neon.yaml \ XDG_CONFIG_HOME=/config - -# Copy ffmpeg binaries from the ffmpeg-base stage -COPY --from=ffmpeg-base /usr/local/bin/ /usr/local/bin/ -COPY --from=ffmpeg-base /usr/local/lib/ /usr/local/lib/ +# Set the ARG value as an environment variable +ENV EXTRAS=${EXTRAS} RUN mkdir -p /neon_iris/requirements COPY ./requirements/* /neon_iris/requirements @@ -37,11 +31,11 @@ RUN pip install . COPY docker_overlay/ / -# Expose port 8000 for websat -EXPOSE 8000 - -# Set the ARG value as an environment variable -ENV EXTRAS=${EXTRAS} +RUN apt-get update \ + && apt-get install -y libsndfile1 libasound2 ffmpeg \ + && apt-get --purge autoremove -y \ + && apt-get clean \ + && rm -rf "${HOME}"/.cache /var/lib/apt /var/log/{apt,dpkg.log} # Create a non-root user with a home directory and change ownership of necessary directories