Skip to content

Commit

Permalink
push to docker hub and add client code
Browse files Browse the repository at this point in the history
  • Loading branch information
litongjava committed Mar 11, 2024
1 parent a58bd39 commit 7e92907
Show file tree
Hide file tree
Showing 4 changed files with 1,047 additions and 3 deletions.
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,35 @@ start server
./cmake-build-debug/whisper_server_base_on_uwebsockets -m models/ggml-base.en.bin
```
Test server
see python [client](client)
see python [client](client)

## Docker
### run whisper-cpp-server:1.0.0
[Dockerfile](./distribute/docker/pure/)
```
docker run -dit --name=whisper-server -p 8080:8080 -v "$(pwd)/models/ggml-base.en.bin":/models/ggml-base.en.bin litongjava/whisper-cpp-server:1.0.0 /app/whisper_http_server_base_httplib -m /models/ggml-base.en.bin
```
the port is 8080
### test
```
curl --location --request POST 'http://127.0.0.1:8080/inference' \
--header 'Accept: */*' \
--header 'Content-Type: multipart/form-data; boundary=--------------------------671827497522367123871197' \
--form 'file=@"E:\\code\\cpp\\cpp-study\\cpp-study-clion\\audio\\jfk.wav"' \
--form 'temperature="0.2"' \
--form 'response-format="json"' \
--form 'audio_format="wav"'
```
### run whisper-cpp-server:1.0.0-base-en
[Dockerfile](./distribute/docker/base.en/)
```
docker run -dit --name whisper-server -p 8080:8080 litongjava/whisper-cpp-server:1.0.0-base-en
```

### run whisper-cpp-server:1.0.0-large-v3
[Dockerfile](./distribute/docker/large-v3/)
```
docker run -dit --name whisper-server -p 8080:8080 litongjava/whisper-cpp-server:1.0.0-large-v3
```

### [Client code](./doc/client_code.md)
2 changes: 1 addition & 1 deletion distribute/docker/base.en/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ docker build -t litongjava/whisper-cpp-server:1.0.0-base-en -f distribute/docker
```

```
docker run --net=host --rm litongjava/whisper-cpp-server:1.0.0-base-en
docker run -dit --name whisper-server -p 8080:8080 litongjava/whisper-cpp-server:1.0.0-base-en
```
4 changes: 3 additions & 1 deletion distribute/docker/large-v3/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ docker build -t litongjava/whisper-cpp-server:1.0.0-large-v3 -f distribute/docke

## test run
```
docker run -dit --net=host --name=whisper-cpp-server litongjava/whisper-cpp-server:1.0.0-large-v3
docker run -dit --name whisper-server -p 8080:8080 litongjava/whisper-cpp-server:1.0.0-large-v3
```



Loading

0 comments on commit 7e92907

Please sign in to comment.