forked from ellenhp/whisper-npu-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuseful_commands.txt
33 lines (29 loc) · 1.24 KB
/
useful_commands.txt
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
30
31
32
33
# To build the image, from src directory.
podman kill whisper-server ; podman rm whisper-server ; podman build -t whisper-server-image .
# To run the server in development mode (map the server.py file into the container so flask can watch for changes)
podman run -d \
--name whisper-server \
-v $PWD/server.py:/src/dictation/server.py:Z \
-p 8009:5000 \
--security-opt seccomp=unconfined \
--ipc=host \
--group-add keep-groups \
--device=/dev/dri \
--device=/dev/accel/accel0 \
whisper-server-image
# To run the server in "release" mode (caveat emptor: Flask still claims it's not a production-ready server).
podman run -d \
--name whisper-server \
-p 8009:5000 \
--security-opt seccomp=unconfined \
--ipc=host \
--group-add keep-groups \
--device=/dev/dri \
--device=/dev/accel/accel0 \
whisper-server-image
# Transcribe a file.
curl --data-binary @courtroom.wav -X POST 127.0.0.1:8009/transcribe
# Generate and enable a systemd unit for the container above.
podman generate systemd whisper-server > $HOME/.config/systemd/user/whisper-server.service
systemctl --user daemon-reload
systemctl --user enable whisper-server.service