Skip to content

Commit

Permalink
Merge pull request #62 from mutablelogic/v1
Browse files Browse the repository at this point in the history
Updated cuda base to 1.0.1
  • Loading branch information
djthorpe authored Aug 11, 2024
2 parents 3444bd8 + baff406 commit beb40fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
13 changes: 8 additions & 5 deletions etc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_TAG=1.0.0
ARG BASE_TAG=1.0.1
ARG BASE_DEV_CONTAINER=ghcr.io/mutablelogic/cuda-dev:${BASE_TAG}
ARG BASE_RUN_CONTAINER=ghcr.io/mutablelogic/cuda-rt:${BASE_TAG}
ARG CUDA_DOCKER_ARCH=all
Expand All @@ -14,7 +14,7 @@ ARG ARCH
ARG OS

RUN apt-get -y update \
&& apt-get -y install software-properties-common curl \
&& apt-get -y install software-properties-common curl libgomp1 \
&& add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg6 \
&& apt-get -y update \
&& apt-get -y install libavformat-dev libavcodec-dev libavdevice-dev libavfilter-dev libavutil-dev libswscale-dev libswresample-dev
Expand All @@ -35,10 +35,12 @@ RUN make -j$(nproc)
# Setup runtime container
FROM ${BASE_RUN_CONTAINER} AS runtime
RUN apt-get -y update \
&& apt-get -y install software-properties-common \
&& apt-get -y install software-properties-common libgomp1 \
&& add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg6 \
&& apt-get -y update \
&& apt-get -y install libavformat60 libavcodec60 libavdevice60 libavfilter9 libavutil58 libswscale7 libswresample4
&& apt-get -y install libavformat60 libavcodec60 libavdevice60 libavfilter9 libavutil58 libswscale7 libswresample4 \
&& apt -y remove software-properties-common \
&& apt -y autoremove
COPY --from=build --chmod=755 /app/build/whisper /usr/local/bin/whisper
COPY --from=build --chmod=755 /app/build/api /usr/local/bin/api
COPY --chmod=755 etc/entrypoint.sh .
Expand All @@ -47,4 +49,5 @@ COPY --chmod=755 etc/entrypoint.sh .
ENTRYPOINT [ "/entrypoint.sh" ]
STOPSIGNAL SIGQUIT
EXPOSE 80
CMD [ "/usr/local/bin/whisper", "-dir", "/data", "-listen", ":80", "server" ]
VOLUME [ "/data" ]
CMD [ "/usr/local/bin/whisper", "--dir", "/data", "--listen", ":80", "--endpoint", "/api/v1", "server" ]
8 changes: 4 additions & 4 deletions sys/whisper/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ package whisper

/*
#cgo pkg-config: libwhisper
#cgo darwin pkg-config: libwhisper-darwin
#cgo linux pkg-config: libwhisper-linux
#cgo darwin pkg-config: libwhisper-darwin
*/
import "C"

// Generate the whisper pkg-config files
// Setting the prefix to the base of the repository
//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
//go:generate go run ../pkg-config --version "0.0.0" --libs "-framework Accelerate -framework Metal -framework Foundation -framework CoreGraphics" libwhisper-darwin.pc
//go:generate go run ../pkg-config --version "0.0.0" --cflags "-fopenmp" --libs "-lgomp" libwhisper-linux.pc
//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
//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
//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 comments on commit beb40fb

Please sign in to comment.