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
OpenDAS
ollama
Commits
6d283882
Unverified
Commit
6d283882
authored
Oct 27, 2023
by
Bruce MacDonald
Committed by
GitHub
Oct 27, 2023
Browse files
catch insufficient permissions nvidia err (#934)
parent
5c3491f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
llm/llama.go
llm/llama.go
+4
-0
No files found.
llm/llama.go
View file @
6d283882
...
...
@@ -212,6 +212,10 @@ func CheckVRAM() (int64, error) {
scanner
:=
bufio
.
NewScanner
(
&
stdout
)
for
scanner
.
Scan
()
{
line
:=
scanner
.
Text
()
if
strings
.
Contains
(
line
,
"[Insufficient Permissions]"
)
{
return
0
,
fmt
.
Errorf
(
"GPU support may not enabled, check you have installed GPU drivers and have the necessary permissions to run nvidia-smi"
)
}
vram
,
err
:=
strconv
.
ParseInt
(
strings
.
TrimSpace
(
line
),
10
,
64
)
if
err
!=
nil
{
return
0
,
fmt
.
Errorf
(
"failed to parse available VRAM: %v"
,
err
)
...
...
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