forked from ggml-org/whisper.cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (23 loc) · 906 Bytes
/
Dockerfile
File metadata and controls
29 lines (23 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 使用带C++编译环境的基础镜像
FROM debian:buster
# 安装CMake供建设工具和基本的库文件
RUN apt-get update && \
apt-get install -y cmake make autoconf libtool pkg-config libboost-all-dev build-essential zlib1g wget
# 设置工作目录
WORKDIR /build
# 将CMake项目文件(CMakeLists.txt)和源代码复制到工作目录
COPY ./ /build/
RUN mkdir -p third_party/websocketpp/build && \
cd third_party/websocketpp/build && \
cmake .. && \
make install
WORKDIR /build
# 运行CMake构建
RUN cmake . && make streaming_websocket_server
RUN rm models/*.bin && \
bash ./models/download-ggml-model.sh tiny.en && \
make quantize && \
./bin/quantize models/ggml-tiny.en.bin models/ggml-tiny.en-q5_0.bin q5_0
# 设置应用程序入口点
EXPOSE 9002
ENTRYPOINT ["/build/bin/streaming_websocket_server","-m","./models/ggml-tiny.en-q5_0.bin","-p","9002"]