Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
Move cuda/rocm dependency gathering into generate script
Daniel Hiltgen8feb97dc0df4
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yamlindex 7217faf7c..4adab4f8b 100644--- a/.github/workflows/release.yaml+++ b/.github/workflows/release.yaml@@ -331,8 +331,6 @@ jobs:$env:CMAKE_SYSTEM_VERSION="10.0.22621.0"$env:PATH="$gopath;$env:PATH"$env:OLLAMA_SKIP_GENERATE="1"- $env:NVIDIA_DIR=$(resolve-path ".\dist\deps")- $env:HIP_PATH=$(resolve-path ".\dist\deps")& .\scripts\build_windows.ps1- uses: actions/upload-artifact@v4with:diff --git a/app/ollama.iss b/app/ollama.issindex f77742dcf..ffeace810 100644--- a/app/ollama.iss+++ b/app/ollama.iss@@ -92,12 +92,8 @@ Source: "..\dist\windows-amd64\*.dll"; DestDir: "{app}"; Flags: ignoreversion 64Source: "..\dist\windows-amd64\ollama_runners\*"; DestDir: "{app}\ollama_runners"; Flags: ignoreversion 64bit recursesubdirsSource: "..\dist\ollama_welcome.ps1"; DestDir: "{app}"; Flags: ignoreversionSource: ".\assets\app.ico"; DestDir: "{app}"; Flags: ignoreversion-; Assumes v5.7, may need adjustments for v6-#if GetEnv("HIP_PATH") != ""- Source: "{#GetEnv('HIP_PATH')}\bin\hipblas.dll"; DestDir: "{app}\rocm\"; Flags: ignoreversion- Source: "{#GetEnv('HIP_PATH')}\bin\rocblas.dll"; DestDir: "{app}\rocm\"; Flags: ignoreversion- ; amdhip64.dll dependency comes from the driver and must be installed already- Source: "{#GetEnv('HIP_PATH')}\bin\rocblas\library\*"; DestDir: "{app}\rocm\rocblas\library\"; Flags: ignoreversion+#if DirExists("..\dist\windows-amd64\rocm")+ Source: "..\dist\windows-amd64\rocm\*"; DestDir: "{app}\rocm\"; Flags: ignoreversion recursesubdirs#endifdiff --git a/llm/generate/gen_windows.ps1 b/llm/generate/gen_windows.ps1index 737cbbee9..fc7fb2550 100644--- a/llm/generate/gen_windows.ps1+++ b/llm/generate/gen_windows.ps1@@ -252,6 +252,11 @@ if ($null -ne $script:CUDA_LIB_DIR) {buildsigninstall++ write-host "copying CUDA dependencies to ${script:SRC_DIR}\dist\windows-${script:ARCH}\"+ cp "${script:CUDA_LIB_DIR}\cudart64_*.dll" "${script:SRC_DIR}\dist\windows-${script:ARCH}\"+ cp "${script:CUDA_LIB_DIR}\cublas64_*.dll" "${script:SRC_DIR}\dist\windows-${script:ARCH}\"+ cp "${script:CUDA_LIB_DIR}\cublasLt64_*.dll" "${script:SRC_DIR}\dist\windows-${script:ARCH}\"}if ($null -ne $env:HIP_PATH) {@@ -295,6 +300,14 @@ if ($null -ne $env:HIP_PATH) {}signinstall++ # Assumes v5.7, may need adjustments for v6+ rm -ea 0 -recurse -force -path "${script:SRC_DIR}\dist\windows-${script:ARCH}\rocm\"+ md "${script:SRC_DIR}\dist\windows-${script:ARCH}\rocm\rocblas\library\" -ea 0 > $null+ cp "${env:HIP_PATH}\bin\hipblas.dll" "${script:SRC_DIR}\dist\windows-${script:ARCH}\rocm\"+ cp "${env:HIP_PATH}\bin\rocblas.dll" "${script:SRC_DIR}\dist\windows-${script:ARCH}\rocm\"+ # amdhip64.dll dependency comes from the driver and must be installed on the host to use AMD GPUs+ cp "${env:HIP_PATH}\bin\rocblas\library\*" "${script:SRC_DIR}\dist\windows-${script:ARCH}\rocm\rocblas\library\"}diff --git a/scripts/build_windows.ps1 b/scripts/build_windows.ps1index a9aade8c0..1131de376 100644--- a/scripts/build_windows.ps1+++ b/scripts/build_windows.ps1@@ -109,9 +109,6 @@ function gatherDependencies() {cp "${env:VCToolsRedistDir}\x64\Microsoft.VC*.CRT\vcruntime140.dll" "${script:DEPS_DIR}\"cp "${env:VCToolsRedistDir}\x64\Microsoft.VC*.CRT\vcruntime140_1.dll" "${script:DEPS_DIR}\"- cp "${script:NVIDIA_DIR}\cudart64_*.dll" "${script:DEPS_DIR}\"- cp "${script:NVIDIA_DIR}\cublas64_*.dll" "${script:DEPS_DIR}\"- cp "${script:NVIDIA_DIR}\cublasLt64_*.dll" "${script:DEPS_DIR}\"cp "${script:SRC_DIR}\app\ollama_welcome.ps1" "${script:SRC_DIR}\dist\"if ("${env:KEY_CONTAINER}") {@@ -123,15 +120,6 @@ function gatherDependencies() {if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}}}- if ($null -ne $env:HIP_PATH) {- # Assumes v5.7, may need adjustments for v6- rm -ea 0 -recurse -force -path "${script:DEPS_DIR}\rocm\"- md "${script:DEPS_DIR}\rocm\rocblas\library\" -ea 0 > $null- cp "${env:HIP_PATH}\bin\hipblas.dll" "${script:DEPS_DIR}\rocm\"- cp "${env:HIP_PATH}\bin\rocblas.dll" "${script:DEPS_DIR}\rocm\"- # amdhip64.dll dependency comes from the driver and must be installed on the host to use AMD GPUs- cp "${env:HIP_PATH}\bin\rocblas\library\*" "${script:DEPS_DIR}\rocm\rocblas\library\"- }}function buildInstaller() {