Skip to content

Commit

Permalink
openai-whisper 20240930
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent committed Nov 18, 2024
1 parent b62dd9b commit 568fbcd
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Formula/o/openai-whisper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ class OpenaiWhisper < Formula
depends_on "ffmpeg"
depends_on "llvm@16" # LLVM 17 PR: https://github.com/numba/llvmlite/pull/1042
depends_on "numpy"
depends_on "python@3.12"
depends_on "python@3.13"
depends_on "pytorch"

on_linux do
depends_on "pkg-config" => :build
end

resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/63/09/c1bc53dab74b1816a00d8d030de5bf98f724c52c1635e07681d312f20be8/charset-normalizer-3.3.2.tar.gz"
sha256 "f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"
url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz"
sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"
end

resource "idna" do
Expand All @@ -52,10 +52,10 @@ class OpenaiWhisper < Formula
end

resource "numba" do
# Fetch from Git hash for numpy 2.1 compatibility.
# Fetch from Git hash for numpy 2.1 and python 3.13 compatibility.
# Use git checkout to avoid .gitattributes causing checksum changes and unknown version info
url "https://github.com/numba/numba.git",
revision: "a344e8f55440c91d40c5221e93a38ce0c149b803"
revision: "391511bcb0b97af8d311cd276a46030774bc30b7"
end

resource "regex" do
Expand All @@ -69,8 +69,8 @@ class OpenaiWhisper < Formula
end

resource "tiktoken" do
url "https://files.pythonhosted.org/packages/c4/4a/abaec53e93e3ef37224a4dd9e2fc6bb871e7a538c2b6b9d2a6397271daf4/tiktoken-0.7.0.tar.gz"
sha256 "1077266e949c24e0291f6c350433c6f0971365ece2b173a23bc3b9f9defef6b6"
url "https://files.pythonhosted.org/packages/37/02/576ff3a6639e755c4f70997b2d315f56d6d71e0d046f4fb64cb81a3fb099/tiktoken-0.8.0.tar.gz"
sha256 "9ccbb2740f24542534369c5635cfd9b2b3c2490754a78ac8831d99f89f94eeb2"
end

resource "tqdm" do
Expand All @@ -85,6 +85,7 @@ class OpenaiWhisper < Formula

def install
ENV["LLVM_CONFIG"] = Formula["llvm@16"].opt_bin/"llvm-config"
inreplace "setup.py", "version=read_version()", "version='#{version}'"
venv = virtualenv_install_with_resources without: "numba"

# We depend on pytorch, but that's a separate formula, so install a `.pth` file to link them.
Expand Down

0 comments on commit 568fbcd

Please sign in to comment.