Skip to content

Commit a422176

Browse files
authored
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
1 parent cead8f5 commit a422176

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.devops/main-musa.Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ FROM ${BASE_MUSA_DEV_CONTAINER} AS build
1010
WORKDIR /app
1111

1212
RUN apt-get update && \
13-
apt-get install -y build-essential libsdl2-dev wget cmake git \
14-
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
13+
apt-get install -y build-essential libsdl2-dev wget cmake git && \
14+
apt-get clean && \
15+
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* /tmp/* /var/tmp/*
1516

1617
COPY .. .
1718
# Enable muBLAS
@@ -21,8 +22,9 @@ FROM ${BASE_MUSA_RUN_CONTAINER} AS runtime
2122
WORKDIR /app
2223

2324
RUN apt-get update && \
24-
apt-get install -y curl ffmpeg wget cmake git \
25-
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
25+
apt-get install -y curl ffmpeg wget cmake git && \
26+
apt-get clean && \
27+
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* /tmp/* /var/tmp/*
2628

2729
COPY --from=build /app /app
2830
ENV PATH=/app/build/bin:$PATH

0 commit comments

Comments
 (0)