Docker image for faster-whisper 1.0.2.
Uses CPU.
-
Log into registry using public credentials:
docker login -u public -p public public.aml-repo.cms.waikato.ac.nz:443
-
Create the following directory:
mkdir cache
-
Launch docker container
docker run \ -u $(id -u):$(id -g) -e USER=$USER \ --shm-size 8G \ -v `pwd`:/workspace \ -v `pwd`/cache:/.cache \ -it public.aml-repo.cms.waikato.ac.nz:443/pytorch/python-faster-whisper:1.0.2_cpu
-
Create the following directory:
mkdir cache
-
Launch docker container
docker run \ -u $(id -u):$(id -g) -e USER=$USER \ --shm-size 8G \ -v `pwd`:/workspace \ -v `pwd`/cache:/.cache \ -it waikatodatamining/python-faster-whisper:1.0.2_cpu
-
Build the image from Docker file (from within /path_to/faster-whisper-1.0.2_cpu)
docker build -t hf .
-
Run the container
docker run --shm-size 8G -v /local/dir:/container/dir -it hf
/local/dir:/container/dir
maps a local disk directory into a directory inside the container
docker build -t python-faster-whisper:1.0.2_cpu .
-
Tag
docker tag \ python-faster-whisper:1.0.2_cpu \ public-push.aml-repo.cms.waikato.ac.nz:443/pytorch/python-faster-whisper:1.0.2_cpu
-
Push
docker push public-push.aml-repo.cms.waikato.ac.nz:443/pytorch/python-faster-whisper:1.0.2_cpu
If error "no basic auth credentials" occurs, then run (enter username/password when prompted):
docker login public-push.aml-repo.cms.waikato.ac.nz:443
-
Tag
docker tag \ python-faster-whisper:1.0.2_cpu \ waikatodatamining/python-faster-whisper:1.0.2_cpu
-
Push
docker push waikatodatamining/python-faster-whisper:1.0.2_cpu
If error "no basic auth credentials" occurs, then run (enter username/password when prompted):
docker login
docker run --rm --pull=always \
-it public.aml-repo.cms.waikato.ac.nz:443/pytorch/python-faster-whisper:1.0.2_cpu \
pip freeze > requirements.txt
The following scripts are available:
fw_predict_poll
- for applying a model to audio files (uses file-polling, calls/opt/faster-whisper/predict_poll.py
)fw_predict_redis
- for applying a model to images (via Redis backend), add--net=host
to the Docker options (calls/opt/faster-whisper/predict_redis.py
)
When running the docker container as regular use, you will want to set the correct user and group on the files generated by the container (aka the user:group launching the container):
docker run -u $(id -u):$(id -g) -e USER=$USER ...