Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions .devops/main-vulkan.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,28 @@ RUN apt-get update && \
apt-get install -y build-essential wget cmake git libvulkan-dev glslc \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

COPY .. .
RUN make base.en CMAKE_ARGS="-DGGML_VULKAN=1"
COPY . .

RUN cmake -B build -DGGML_NATIVE=OFF -DGGML_VULKAN=ON -DWHISPER_BUILD_TESTS=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON \
&& cmake --build build --config Release -j $(nproc)

RUN mkdir -p /app/lib && \
find build -name "*.so*" -exec cp -P {} /app/lib \;

FROM ubuntu:24.04 AS runtime
WORKDIR /app

RUN apt-get update && \
apt-get install -y curl ffmpeg libsdl2-dev wget cmake git libvulkan1 mesa-vulkan-drivers \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
RUN apt-get update \
&& apt-get install -y curl ffmpeg wget libvulkan1 mesa-vulkan-drivers \
&& apt autoremove -y \
&& apt clean -y \
&& rm -rf /tmp/* /var/tmp/* \
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
&& find /var/cache -type f -delete

COPY --from=build /app/build/bin /app
COPY --from=build /app/lib /app
COPY --from=build /app/models /app/models

COPY --from=build /app /app
ENV PATH=/app/build/bin:$PATH
ENV PATH=/app:$PATH
ENTRYPOINT [ "bash", "-c" ]
30 changes: 21 additions & 9 deletions .devops/main.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
FROM ubuntu:22.04 AS build
FROM ubuntu:24.04 AS build
WORKDIR /app

RUN apt-get update && \
apt-get install -y build-essential wget cmake git \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

COPY .. .
RUN make base.en
COPY . .

FROM ubuntu:22.04 AS runtime
RUN cmake -B build -DGGML_NATIVE=OFF -DWHISPER_BUILD_TESTS=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON \
&& cmake --build build --config Release -j $(nproc)

RUN mkdir -p /app/lib && \
find build -name "*.so*" -exec cp -P {} /app/lib \;

FROM ubuntu:24.04 AS runtime
WORKDIR /app

RUN apt-get update && \
apt-get install -y curl ffmpeg libsdl2-dev wget cmake git \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
RUN apt-get update \
&& apt-get install -y curl ffmpeg wget \
&& apt autoremove -y \
&& apt clean -y \
&& rm -rf /tmp/* /var/tmp/* \
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
&& find /var/cache -type f -delete

COPY --from=build /app/build/bin /app
COPY --from=build /app/lib /app
COPY --from=build /app/models /app/models

COPY --from=build /app /app
ENV PATH=/app/build/bin:$PATH
ENV PATH=/app:$PATH
ENTRYPOINT [ "bash", "-c" ]
18 changes: 16 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
build*/
*.o
*.a
.cache/
# Do not ignore .git directory, otherwise the reported build number will always be 0
.github/
.devops/
.gitignore
.vs/
.vscode/
.DS_Store
*.md
*.cmd

build*/
.devops/
models/*.bin
samples/
tests/
Loading