This website requires JavaScript.
Explore
Help
Sign in
baalajimaestro
/
ollama
Watch
1
Star
0
Fork
You've already forked ollama
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
4157d1f7b6
ollama
/
server
/
sparse_common.go
9 lines
79 B
Go
Raw
Normal View
History
Unescape
Escape
Ensure sparse files on windows during download The file.Truncate call on windows will write the whole file unless you set the sparse flag, leading to heavy I/O at the beginning of download. This should improve our I/O behavior on windows and put less stress on the users disk.
2024-08-06 17:46:31 +00:00
//go:build !windows
package
server
import
"os"
Don't hard fail on sparse setup error It seems this can fail in some casees, but proceed with the download anyway.
2024-08-09 18:57:48 +00:00
func
setSparse
(
*
os
.
File
)
{
Ensure sparse files on windows during download The file.Truncate call on windows will write the whole file unless you set the sparse flag, leading to heavy I/O at the beginning of download. This should improve our I/O behavior on windows and put less stress on the users disk.
2024-08-06 17:46:31 +00:00
}
Reference in a new issue
Copy permalink