ci : add apt-get clean to musa Dockerfile (#3275)

* ci : add apt-get clean to musa Dockerfile

This commit adds `apt-get clean` to the musa Dockerfile to reduce the
image size by removing cached package files after installation.

The motivation for this is to try to reduce the size of the Docker image
and see if this can avoid the "no space left on device" error during
the CI build process.

Refs: https://github.com/ggml-org/whisper.cpp/actions/runs/15815324254
This commit is contained in:
Daniel Bevenius 2025-06-23 12:34:44 +02:00 committed by GitHub
parent cead8f5357
commit a422176937
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,8 +10,9 @@ FROM ${BASE_MUSA_DEV_CONTAINER} AS build
WORKDIR /app WORKDIR /app
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y build-essential libsdl2-dev wget cmake git \ apt-get install -y build-essential libsdl2-dev wget cmake git && \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* /tmp/* /var/tmp/*
COPY .. . COPY .. .
# Enable muBLAS # Enable muBLAS
@ -21,8 +22,9 @@ FROM ${BASE_MUSA_RUN_CONTAINER} AS runtime
WORKDIR /app WORKDIR /app
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y curl ffmpeg wget cmake git \ apt-get install -y curl ffmpeg wget cmake git && \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* /tmp/* /var/tmp/*
COPY --from=build /app /app COPY --from=build /app /app
ENV PATH=/app/build/bin:$PATH ENV PATH=/app/build/bin:$PATH