Coder Social home page Coder Social logo

Comments (6)

Gldkslfmsd avatar Gldkslfmsd commented on August 28, 2024

hi, can you specify what behaviour do you expect and what is wrong? what do you mean by "it said"?

what do you mean by the 3 lines below?

from whisper_streaming.

DoiiarX avatar DoiiarX commented on August 28, 2024

hi, can you specify what behaviour do you expect and what is wrong? what do you mean by "it said"?

what do you mean by the 3 lines below?

Thank you for your response. I'm using a Dockerfile to build my application, and I am encountering issues when specifying the model directory in the Dockerfile's CMD instruction. Here's a clearer explanation of what I'm trying to achieve and the issues I'm facing:

I need to use a local model for Whisper rather than fetching it from a Hugging Face repository each time. However, when I attempt to specify the local model path, the application seems to insist on a Hugging Face repository path instead. Below are the variations of the CMD instruction I tried, all of which resulted in errors indicating that a Hugging Face repository path is required:

  1. Directly specifying the path to the model binary:

    CMD ["python", "whisper_online_server.py", "--model_dir", "/app/models/faster-distil-whisper-large-v3/model.bin", "--backend", "faster-whisper"]
    
  2. Attempting to use --model_cache_dir with the binary's path:

    CMD ["python", "whisper_online_server.py", "--model_cache_dir", "/app/models/faster-distil-whisper-large-v3/model.bin", "--backend", "faster-whisper"]
    
  3. Using --model_cache_dir with just the directory path:

    CMD ["python", "whisper_online_server.py", "--model_cache_dir", "/app/models/faster-distil-whisper-large-v3", "--backend", "faster-whisper"]
    

Could you please provide guidance on how to correctly configure the Dockerfile to use a locally stored model? I'm looking to avoid repeated downloads from the internet due to bandwidth limitations.

Thank you for your assistance.

from whisper_streaming.

DoiiarX avatar DoiiarX commented on August 28, 2024

How could I rewrite this file?

FROM nvidia/cuda:12.0.0-cudnn8-runtime-ubuntu20.04

# 设置工作目录
WORKDIR /app

# 安装系统依赖和Python依赖
RUN apt-get update && apt-get install -y \
    libsndfile1 \
    python3.8 \
    python3-pip \
    git \
 && 
    pip install --no-cache-dir librosa soundfile av faster-whisper ctranslate2==3.24.0

# 克隆whisper_streaming仓库
RUN git clone https://github.com/ufal/whisper_streaming.git

# 切换到仓库目录
WORKDIR /app/whisper_streaming

# 暴露端口,如果有需要的话
EXPOSE 8000

# 运行whisper_streaming服务
CMD ["python", "whisper_online_server.py", "--backend", "faster-whisper"]

from whisper_streaming.

Gldkslfmsd avatar Gldkslfmsd commented on August 28, 2024

the application seems to insist on a Hugging Face repository path instead.

Can you specify from what evidence did you conclude this? What was the error or log message?

Could you please provide guidance on how to correctly configure the Dockerfile to use a locally stored model? I'm looking to avoid repeated downloads from the internet due to bandwidth limitations.
How could I rewrite this file?

I don't know., I can't help with Docker. Make it working inside docker, or locally, then put it to dockerfile.

Maybe you're confusing model.bin file for a dir where model.bin and other necessary files are located?

from whisper_streaming.

DoiiarX avatar DoiiarX commented on August 28, 2024

the application seems to insist on a Hugging Face repository path instead.

Can you specify from what evidence did you conclude this? What was the error or log message?

Could you please provide guidance on how to correctly configure the Dockerfile to use a locally stored model? I'm looking to avoid repeated downloads from the internet due to bandwidth limitations.
How could I rewrite this file?

I don't know., I can't help with Docker. Make it working inside docker, or locally, then put it to dockerfile.

Maybe you're confusing model.bin file for a dir where model.bin and other necessary files are located?

Thank you for your help; I have solved the issue.

The problem was that it required an absolute path and the use of the --model_dir parameter. The final command is:

CMD ["python3", "whisper_online_server.py", "--backend", "faster-whisper", "--host", "0.0.0.0", "--port", "41007", "--model", "large-v3", "--model_dir", "/app/models/faster-distil-whisper-large-v3"]

Thanks to your suggestion, I found the key to resolving the issue.

from whisper_streaming.

Gldkslfmsd avatar Gldkslfmsd commented on August 28, 2024

yes

from whisper_streaming.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.