Build
Development Environment¶
Install poetry with following command:
pip3 install poetry
Install torch with following command:
# just for GPU:
pip3 install torch==1.13.1+cu117 -f https://download.pytorch.org/whl/torch
Run¶
Install packages:
poetry install
Starting the Webservice:
poetry run whisper-asr-webservice --host 0.0.0.0 --port 9000
Build¶
Build .whl package
poetry build
With Dockerfile
:
# Build Image
docker build -t whisper-asr-webservice .
# Run Container
docker run -d -p 9000:9000 whisper-asr-webservice
# or
docker run -d -p 9001:9000 -e ASR_MODEL=base whisper-asr-webservice3
# Build Image
docker build -f Dockerfile.gpu -t whisper-asr-webservice-gpu .
# Run Container
docker run -d --gpus all -p 9000:9000 whisper-asr-webservice-gpu
# or
docker run -d --gpus all -p 9000:9000 -e ASR_MODEL=base whisper-asr-webservice-gpu
With docker-compose
:
docker-compose up --build
docker-compose up --build -f docker-compose.gpu.yml