diff --git a/Docker/miniforge_install.sh b/Docker/miniforge_install.sh index b2ba8c0a..5dea4f79 100644 --- a/Docker/miniforge_install.sh +++ b/Docker/miniforge_install.sh @@ -59,17 +59,17 @@ source "$HOME/.bashrc" "$HOME/conda/bin/conda" install gcc=11 gxx ffmpeg uv cmake make unzip $SYSROOT_PKG "libstdcxx-ng>=11" -y +cd workspace + if [ "$CUDA_VERSION" = "12.8" ]; then - "$HOME/conda/bin/uv" pip install ".[cu128]" --no-cache-dir --python "$(which python)" - "$HOME/conda/bin/conda" install cuda-nvcc=12.8 -y + "$HOME/conda/bin/uv" pip install ".[cu128]" --no-cache-dir --python "$HOME/conda/bin/python" elif [ "$CUDA_VERSION" = "12.6" ]; then - "$HOME/conda/bin/uv" pip install ".[cu126]" --no-cache-dir --python "$(which python)" - "$HOME/conda/bin/conda" install cuda-nvcc=12.6 -y + "$HOME/conda/bin/uv" pip install ".[cu126]" --no-cache-dir --python "$HOME/conda/bin/python" fi export PATH="$HOME/conda/bin:$PATH" -"$HOME/conda/bin/uv" pip install ".[flash-attn]" --python "$(which python)" +"$HOME/conda/bin/uv" pip install ".[flash-attn]" --python "$HOME/conda/bin/python" "$HOME/conda/bin/uv" cache clean rm $LOG_PATH diff --git a/install.ps1 b/install.ps1 index ff4580c9..cb990f20 100644 --- a/install.ps1 +++ b/install.ps1 @@ -331,7 +331,6 @@ switch ($Device) { } Write-Info "Installing PyTorch For CUDA 12.8..." Invoke-PIP ".[cu128]" - Invoke-Conda cuda-nvcc=12.8 Write-Info "Installing Flash Attn..." Invoke-PIP ".[flash-attn]" Write-Success "Flash Attn Installed" @@ -346,7 +345,6 @@ switch ($Device) { } Write-Info "Installing PyTorch For CUDA 12.6..." Invoke-PIP ".[cu126]" - Invoke-Conda cuda-nvcc=12.6 Write-Info "Installing Flash Attn..." Invoke-PIP ".[flash-attn]" Write-Success "Flash Attn Installed" diff --git a/install.sh b/install.sh index e3ca4efd..cbce27e1 100644 --- a/install.sh +++ b/install.sh @@ -392,14 +392,12 @@ if [ "$USE_CUDA" = true ] && [ "$WORKFLOW" = false ]; then fi echo -e "${INFO}Installing PyTorch For CUDA 12.8..." run_pip_quiet ".[cu128]" - run_conda_quiet cuda-nvcc=12.8 elif [ "$CUDA" = 126 ]; then if awk "BEGIN {exit !($CUDAVERSION < 12.0)}"; then echo -e "${WARNING}CUDA 12.6 Is Not Supported By Current Driver" fi echo -e "${INFO}Installing PyTorch For CUDA 12.6..." run_pip_quiet ".[cu126]" - run_conda_quiet cuda-nvcc=12.6 fi echo -e "${INFO}Installing Flash Attn" diff --git a/pyproject.toml b/pyproject.toml index ee3cd0a4..a948a652 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,6 +75,12 @@ dependency-metadata = [ { name = "faster-whisper", requires-dist = [], requires-python = ">=3.10" }, ] +[tool.uv.extra-build-dependencies] +flash-attn = [{ requirement = "torch", match-runtime = true }] + +[tool.uv.extra-build-variables] +flash-attn = { FLASH_ATTENTION_SKIP_CUDA_BUILD = "TRUE" } + [tool.uv.pip] no-binary = ["opencc"]