Skip to content

Latest commit

 

History

History

faster-whisper-1.0.2_cpu

faster-whisper

Docker image for faster-whisper 1.0.2.

Uses CPU.

Quick start

Inhouse registry

  • 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

Docker hub

  • 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 local image

  • 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

Publish images

Build

docker build -t python-faster-whisper:1.0.2_cpu .

Inhouse registry

  • 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

Docker hub

  • 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

Requirements

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

Scripts

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)

Permissions

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 ...