Skip to content

Commit 636b319

Browse files
committed
Updated dockerfile
1 parent 8e607a0 commit 636b319

File tree

4 files changed

+42
-81
lines changed

4 files changed

+42
-81
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ docker: docker-dep submodule
5151
--build-arg OS=${OS} \
5252
--build-arg SOURCE=${BUILD_MODULE} \
5353
--build-arg VERSION=${VERSION} \
54-
-f etc/Dockerfile.${OS}-${ARCH} .
54+
-f etc/Dockerfile .
5555

5656
# Test whisper bindings
5757
test: generate libwhisper libggml

etc/Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
ARG BASE_TAG=0.0.10-4-g6421fd2
2+
ARG BASE_DEV_CONTAINER=ghcr.io/mutablelogic/cuda-dev:${BASE_TAG}
3+
ARG BASE_RUN_CONTAINER=ghcr.io/mutablelogic/cuda-rt:${BASE_TAG}
4+
ARG CUDA_DOCKER_ARCH=all
5+
ARG GO_VERSION=1.22.5
6+
ARG ARCH
7+
ARG OS
8+
9+
# Setup build container
10+
FROM ${BASE_DEV_CONTAINER} AS build
11+
ARG CUDA_DOCKER_ARCH
12+
ARG GO_VERSION
13+
ARG ARCH
14+
ARG OS
15+
16+
RUN apt-get -y install software-properties-common curl \
17+
&& add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg6 \
18+
&& apt-get -y update \
19+
&& apt-get -y install libavcodec-dev libavdevice-dev libavfilter-dev libavutil-dev libswscale-dev libswresample-dev
20+
21+
# Install go
22+
RUN curl -sL https://golang.org/dl/go${GO_VERSION}.${OS}-${ARCH}.tar.gz | tar -C /usr/local -xz
23+
ENV PATH=$PATH:/usr/local/go/bin
24+
25+
# Copy source
26+
WORKDIR /app
27+
COPY . .
28+
29+
# Make whisper-server
30+
ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}
31+
ENV GGML_CUDA=1
32+
RUN make -j$(nproc) server
33+
34+
# Setup runtime container
35+
FROM ${BASE_RUN_CONTAINER} AS runtime
36+
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install libgomp1
37+
COPY --from=build --chmod=755 /app/build/whisper /usr/local/bin/whisper
38+
39+
# Expose
40+
ENTRYPOINT [ "/usr/local/bin/whisper" ]
41+
CMD [ "server", "--dir=/data" ]

etc/Dockerfile.linux-amd64

Lines changed: 0 additions & 40 deletions
This file was deleted.

etc/Dockerfile.linux-arm64

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)