Skip to content

Commit beb40fb

Browse files
authored
Merge pull request #62 from mutablelogic/v1
Updated cuda base to 1.0.1
2 parents 3444bd8 + baff406 commit beb40fb

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

etc/Dockerfile

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG BASE_TAG=1.0.0
1+
ARG BASE_TAG=1.0.1
22
ARG BASE_DEV_CONTAINER=ghcr.io/mutablelogic/cuda-dev:${BASE_TAG}
33
ARG BASE_RUN_CONTAINER=ghcr.io/mutablelogic/cuda-rt:${BASE_TAG}
44
ARG CUDA_DOCKER_ARCH=all
@@ -14,7 +14,7 @@ ARG ARCH
1414
ARG OS
1515

1616
RUN apt-get -y update \
17-
&& apt-get -y install software-properties-common curl \
17+
&& apt-get -y install software-properties-common curl libgomp1 \
1818
&& add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg6 \
1919
&& apt-get -y update \
2020
&& apt-get -y install libavformat-dev libavcodec-dev libavdevice-dev libavfilter-dev libavutil-dev libswscale-dev libswresample-dev
@@ -35,10 +35,12 @@ RUN make -j$(nproc)
3535
# Setup runtime container
3636
FROM ${BASE_RUN_CONTAINER} AS runtime
3737
RUN apt-get -y update \
38-
&& apt-get -y install software-properties-common \
38+
&& apt-get -y install software-properties-common libgomp1 \
3939
&& add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg6 \
4040
&& apt-get -y update \
41-
&& apt-get -y install libavformat60 libavcodec60 libavdevice60 libavfilter9 libavutil58 libswscale7 libswresample4
41+
&& apt-get -y install libavformat60 libavcodec60 libavdevice60 libavfilter9 libavutil58 libswscale7 libswresample4 \
42+
&& apt -y remove software-properties-common \
43+
&& apt -y autoremove
4244
COPY --from=build --chmod=755 /app/build/whisper /usr/local/bin/whisper
4345
COPY --from=build --chmod=755 /app/build/api /usr/local/bin/api
4446
COPY --chmod=755 etc/entrypoint.sh .
@@ -47,4 +49,5 @@ COPY --chmod=755 etc/entrypoint.sh .
4749
ENTRYPOINT [ "/entrypoint.sh" ]
4850
STOPSIGNAL SIGQUIT
4951
EXPOSE 80
50-
CMD [ "/usr/local/bin/whisper", "-dir", "/data", "-listen", ":80", "server" ]
52+
VOLUME [ "/data" ]
53+
CMD [ "/usr/local/bin/whisper", "--dir", "/data", "--listen", ":80", "--endpoint", "/api/v1", "server" ]

sys/whisper/generate.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ package whisper
55

66
/*
77
#cgo pkg-config: libwhisper
8-
#cgo darwin pkg-config: libwhisper-darwin
98
#cgo linux pkg-config: libwhisper-linux
9+
#cgo darwin pkg-config: libwhisper-darwin
1010
*/
1111
import "C"
1212

1313
// Generate the whisper pkg-config files
1414
// Setting the prefix to the base of the repository
15-
//go:generate go run ../pkg-config --version "0.0.0" --prefix "../.." --cflags "-I$DOLLAR{prefix}/third_party/whisper.cpp/include -I$DOLLAR{prefix}/third_party/whisper.cpp/ggml/include" --libs "-L$DOLLAR{prefix}/third_party/whisper.cpp -lwhisper -lggml -lm -lstdc++" libwhisper.pc
16-
//go:generate go run ../pkg-config --version "0.0.0" --libs "-framework Accelerate -framework Metal -framework Foundation -framework CoreGraphics" libwhisper-darwin.pc
17-
//go:generate go run ../pkg-config --version "0.0.0" --cflags "-fopenmp" --libs "-lgomp" libwhisper-linux.pc
15+
//go:generate go run ../pkg-config --version "0.0.0" --prefix "../.." --cflags "-I$DOLLAR{prefix}/third_party/whisper.cpp/include -I$DOLLAR{prefix}/third_party/whisper.cpp/ggml/include" libwhisper.pc
16+
//go:generate go run ../pkg-config --version "0.0.0" --prefix "../.." --cflags "-fopenmp" --libs "-L$DOLLAR{prefix}/third_party/whisper.cpp -lwhisper -lggml -lgomp -lm -lstdc++" libwhisper-linux.pc
17+
//go:generate go run ../pkg-config --version "0.0.0" --prefix "../.." --libs "-L$DOLLAR{prefix}/third_party/whisper.cpp -lwhisper -lggml -lm -lstdc++ -framework Accelerate -framework Metal -framework Foundation -framework CoreGraphics" libwhisper-darwin.pc

0 commit comments

Comments
 (0)