mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-09 20:58:12 +01:00
AMD IGPU support (#14944)
This commit is contained in:
@@ -69,6 +69,13 @@ if ! fetch_and_deploy_gh_release "ollama-com" "ollama/ollama" "prebuild" "latest
|
|||||||
msg_error "Failed to download or deploy Ollama – check network connectivity and GitHub API availability"
|
msg_error "Failed to download or deploy Ollama – check network connectivity and GitHub API availability"
|
||||||
exit 250
|
exit 250
|
||||||
fi
|
fi
|
||||||
|
# If /dev/kfd exists assume an AMD GPU is installed, and install ROCM support for ollama
|
||||||
|
if [[ -e /dev/kfd ]]; then
|
||||||
|
if ! fetch_and_deploy_gh_release "ollama-rocm-com" "ollama/ollama" "prebuild" "latest" "$OLLAMA_INSTALL_DIR/lib" "ollama-linux-amd64-rocm.tar.zst"; then
|
||||||
|
msg_error "Failed to download or deploy Ollama AMD ROCM suport – check network connectivity and GitHub API availability"
|
||||||
|
exit 250
|
||||||
|
fi
|
||||||
|
fi
|
||||||
ln -sf "$OLLAMA_INSTALL_DIR/bin/ollama" "$BINDIR/ollama"
|
ln -sf "$OLLAMA_INSTALL_DIR/bin/ollama" "$BINDIR/ollama"
|
||||||
msg_ok "Installed Ollama"
|
msg_ok "Installed Ollama"
|
||||||
|
|
||||||
@@ -102,6 +109,10 @@ RestartSec=3
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
if [[ -e /dev/kfd ]]; then
|
||||||
|
sed -i '/Environment=OLLAMA_INTEL_GPU=true/a Environment=OLLAMA_IGPU_ENABLE=1' \
|
||||||
|
/etc/systemd/system/ollama.service
|
||||||
|
fi
|
||||||
systemctl enable -q --now ollama
|
systemctl enable -q --now ollama
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -3982,7 +3982,7 @@ $PCT_OPTIONS_STRING"
|
|||||||
if [[ -d /dev/dri ]]; then
|
if [[ -d /dev/dri ]]; then
|
||||||
# Only add if not already claimed by Intel
|
# Only add if not already claimed by Intel
|
||||||
if [[ ${#INTEL_DEVICES[@]} -eq 0 ]]; then
|
if [[ ${#INTEL_DEVICES[@]} -eq 0 ]]; then
|
||||||
for d in /dev/dri/renderD* /dev/dri/card*; do
|
for d in /dev/dri/renderD* /dev/dri/card* /dev/kfd; do
|
||||||
[[ -e "$d" ]] && AMD_DEVICES+=("$d")
|
[[ -e "$d" ]] && AMD_DEVICES+=("$d")
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user