Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
orangecat
ollama
Commits
6d423b38
Unverified
Commit
6d423b38
authored
May 28, 2024
by
Jeffrey Morgan
Committed by
GitHub
May 28, 2024
Browse files
Improve install experience on WSL2 and Linux (#4653)
parent
ad897080
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
scripts/install.sh
scripts/install.sh
+13
-1
No files found.
scripts/install.sh
View file @
6d423b38
...
...
@@ -35,7 +35,7 @@ esac
KERN
=
$(
uname
-r
)
case
"
$KERN
"
in
*
icrosoft
*
WSL2
|
*
icrosoft
*
wsl2
)
;;
*
icrosoft
*
WSL2
|
*
icrosoft
*
wsl2
)
IS_WSL2
=
true
;;
*
icrosoft
)
error
"Microsoft WSL1 is not currently supported. Please upgrade to WSL2 with 'wsl --set-version <distro> 2'"
;;
*
)
;;
esac
...
...
@@ -131,6 +131,17 @@ if available systemctl; then
configure_systemd
fi
# WSL2 only supports GPUs via nvidia passthrough
# so check for nvidia-smi to determine if GPU is available
if
[
"
$IS_WSL2
"
=
true
]
;
then
if
available nvidia-smi
&&
[
-z
"
$(
nvidia-smi |
grep
-o
"CUDA Version: [0-9]*
\.
[0-9]*"
)
"
]
;
then
status
"Nvidia GPU detected."
fi
install_success
exit
0
fi
# Install GPU dependencies on Linux
if
!
available lspci
&&
!
available lshw
;
then
warning
"Unable to detect NVIDIA/AMD GPU. Install lspci or lshw to automatically detect and install GPU dependencies."
exit
0
...
...
@@ -310,3 +321,4 @@ if command -v nvidia-persistenced > /dev/null 2>&1; then
fi
status
"NVIDIA GPU ready."
install_success
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment