JigsawStack / insanely-fast-whisper-api

An API to transcribe audio with OpenAI's Whisper Large v3!
MIT License
166 stars 22 forks source link

Installation issues: NVIDIA Driver was not detected, plus other errors #14

Closed IzzyHibbert closed 1 month ago

IzzyHibbert commented 1 month ago

Hi.

In my Windows 11 I have a GPU and Docker already contains several images related to other projects where GPU is successfully used. Also you can see that WSL2 is ON

Screenshot 2024-08-13 alle 16 45 56

My first attempts to have insanely-fast-whisper-api installed were made by using the command :

docker pull yoeven/insanely-fast-whisper-api:latest

At the end of the creation I had to create the image, which I made through :

Screenshot 2024-08-13 alle 16 42 56

After the container is created, I notice in the logs that it's not created correctly, the following message appears :

WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available.

From there, the steps that follow are worst and errors appear :

Screenshot 2024-08-13 alle 17 10 18

The container stops.

I repeated the installation, this time with a manual process through Dockerfile. The result is exactly the same and the same error appear. Using the command nvidia-smi in the consolle, inside the container shows ko. If I run the same command in the Server, I can see Docker:

Screenshot 2024-08-13 alle 16 49 13

I tried already both the installations (Dockerfile and Pull) but the result is always the same. Also restarting the server doesn't help. Any idea ?

IzzyHibbert commented 1 month ago

Hours of attempts ☹️, but at the end I made it..😎

You build your image with

docker build -t insanely-fast-whisper-api .

(which I made correct). My following attempts were for starting the container by using Docker Desktop, which apparently was not correctly passing the parameters: most of all the GPU.

Better to start the container with something like :

docker run --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 -p 6006:6006 -p 8888:8888 -p 9000:9000 insanely-fast-whisper-api

Then it starts ok and loads the GPU and the model.. You can then do a test with :

curl --location 'http://the_ip_goes_here:9000/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
    "url": "https://huggingface.co/datasets/reach-vb/random-audios/resolve/main/ted_60.wav",
    "task":"transcribe"
}'