Skip to content

Latest commit

 

History

History

faster-whisper-1.0.2_cuda12.1

faster-whisper

Docker image for faster-whisper 1.0.2.

Uses PyTorch 2.3.0, CUDA 12.1.

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 \
      --gpus=all \
      --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_cuda12.1

Docker hub

  • Create the following directory:

    mkdir cache
  • Launch docker container

    docker run \
      -u $(id -u):$(id -g) -e USER=$USER \
      --gpus=all \
      --shm-size 8G \
      -v `pwd`:/workspace \
      -v `pwd`/cache:/.cache \
      -it waikatodatamining/python-faster-whisper:1.0.2_cuda12.1

Build local image

  • Build the image from Docker file (from within /path_to/faster-whisper-1.0.2_cuda12.1)

    docker build -t hf .
  • Run the container

    docker run --gpus=all --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_cuda12.1 .

Inhouse registry

  • Tag

    docker tag \
      python-faster-whisper:1.0.2_cuda12.1 \
      public-push.aml-repo.cms.waikato.ac.nz:443/pytorch/python-faster-whisper:1.0.2_cuda12.1
  • Push

    docker push public-push.aml-repo.cms.waikato.ac.nz:443/pytorch/python-faster-whisper:1.0.2_cuda12.1

    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_cuda12.1 \
      waikatodatamining/python-faster-whisper:1.0.2_cuda12.1
  • Push

    docker push waikatodatamining/python-faster-whisper:1.0.2_cuda12.1

    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_cuda12.1 \
  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 ...