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
eda472df
Unverified
Commit
eda472df
authored
May 24, 2025
by
frob
Committed by
GitHub
May 24, 2025
Browse files
server: add hint to the error message when model path access fails (#10843)
parent
f18e0cb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
server/modelpath.go
server/modelpath.go
+2
-2
No files found.
server/modelpath.go
View file @
eda472df
...
@@ -116,7 +116,7 @@ func (mp ModelPath) BaseURL() *url.URL {
...
@@ -116,7 +116,7 @@ func (mp ModelPath) BaseURL() *url.URL {
func
GetManifestPath
()
(
string
,
error
)
{
func
GetManifestPath
()
(
string
,
error
)
{
path
:=
filepath
.
Join
(
envconfig
.
Models
(),
"manifests"
)
path
:=
filepath
.
Join
(
envconfig
.
Models
(),
"manifests"
)
if
err
:=
os
.
MkdirAll
(
path
,
0
o755
);
err
!=
nil
{
if
err
:=
os
.
MkdirAll
(
path
,
0
o755
);
err
!=
nil
{
return
""
,
err
return
""
,
fmt
.
Errorf
(
"%w: ensure path elements are traversable"
,
err
)
}
}
return
path
,
nil
return
path
,
nil
...
@@ -139,7 +139,7 @@ func GetBlobsPath(digest string) (string, error) {
...
@@ -139,7 +139,7 @@ func GetBlobsPath(digest string) (string, error) {
}
}
if
err
:=
os
.
MkdirAll
(
dirPath
,
0
o755
);
err
!=
nil
{
if
err
:=
os
.
MkdirAll
(
dirPath
,
0
o755
);
err
!=
nil
{
return
""
,
err
return
""
,
fmt
.
Errorf
(
"%w: ensure path elements are traversable"
,
err
)
}
}
return
path
,
nil
return
path
,
nil
...
...
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