Docker images with GPU for Jetson Nano / Xavier NX boards and PCs with NVIDIA cards.
Pull an existing image with a required tag.
docker pull sskorol/vosk-api:$TAG
Use it as a baseline in your app's Dockerfile:
FROM sskorol/vosk-api:$TAG
Clone sources and check a build file help:
git clone https://github.com/format37/vosk-api-gpu.git
cd vosk-api-gpu
./build.sh -h
Then run it with required args depending on your platform, e.g.:
./build.sh -m nano -i ml -t 0.3.27
Pc (check latest version at https://hub.docker.com/r/sskorol/vosk-api/tags?page=1&ordering=last_updated):
docker pull sskorol/vosk-api:0.3.27-pc
You can check the available NVIDIA base image tags here and here.
update ip to your host's ip in docker-compose.yml
ports:
- 10.2.5.212:2700:2700
Note that you have to download and extract a required model into ./model
folder.
wget https://alphacephei.com/vosk/models/vosk-model-ru-0.10.zip
unzip vosk-model-ru-0.10.zip
mv vosk-model-ru-0.10 model
To build images for PC, use the following script:
./build-pc.sh
It'll build 2 images: base and a sample Vosk server.
To start a newly built container, run the following command:
docker-compose up -d
Also make sure you have at least Docker (20.10.6) and Compose (1.29.1) versions.
Your host's CUDA version should match the container's. Jetson images were built with CUDA 10.1. As per the desktop version: CUDA 11.3.0 was used.