From ccc8c6777bc926b4cdb3b0a89ad344418b6710da Mon Sep 17 00:00:00 2001 From: frob Date: Wed, 9 Apr 2025 00:01:39 +0200 Subject: [PATCH] cleanup: remove OLLAMA_TMPDIR and references to temporary executables (#10182) * cleanup: remove OLLAMA_TMPDIR * cleanup: ollama doesn't use temporary executables anymore --------- Co-authored-by: Richard Lyons --- cmd/cmd.go | 1 - docs/troubleshooting.md | 5 ----- docs/windows.md | 1 - 3 files changed, 7 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index 847278629..fef7242b7 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -1381,7 +1381,6 @@ func NewCLI() *cobra.Command { envVars["OLLAMA_NOPRUNE"], envVars["OLLAMA_ORIGINS"], envVars["OLLAMA_SCHED_SPREAD"], - envVars["OLLAMA_TMPDIR"], envVars["OLLAMA_FLASH_ATTENTION"], envVars["OLLAMA_KV_CACHE_TYPE"], envVars["OLLAMA_LLM_LIBRARY"], diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 32ad48c41..ba5487fef 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -26,7 +26,6 @@ When you run Ollama on **Windows**, there are a few different locations. You can - `explorer %LOCALAPPDATA%\Ollama` to view logs. The most recent server logs will be in `server.log` and older logs will be in `server-#.log` - `explorer %LOCALAPPDATA%\Programs\Ollama` to browse the binaries (The installer adds this to your user PATH) - `explorer %HOMEPATH%\.ollama` to browse where models and configuration is stored -- `explorer %TEMP%` where temporary executable files are stored in one or more `ollama*` directories To enable additional debug logging to help troubleshoot problems, first **Quit the running app from the tray menu** then in a powershell terminal @@ -69,10 +68,6 @@ If you run into problems on Linux and want to install an older version, or you'd curl -fsSL https://ollama.com/install.sh | OLLAMA_VERSION=0.5.7 sh ``` -## Linux tmp noexec - -If your system is configured with the "noexec" flag where Ollama stores its temporary executable files, you can specify an alternate location by setting OLLAMA_TMPDIR to a location writable by the user ollama runs as. For example OLLAMA_TMPDIR=/usr/share/ollama/ - ## Linux docker If Ollama initially works on the GPU in a docker container, but then switches to running on CPU after some period of time with errors in the server log reporting GPU discovery failures, this can be resolved by disabling systemd cgroup management in Docker. Edit `/etc/docker/daemon.json` on the host and add `"exec-opts": ["native.cgroupdriver=cgroupfs"]` to the docker configuration. diff --git a/docs/windows.md b/docs/windows.md index 78b99a5d7..0bffa4b41 100644 --- a/docs/windows.md +++ b/docs/windows.md @@ -62,7 +62,6 @@ the explorer window by hitting `+R` and type in: - *upgrade.log* contains log output for upgrades - `explorer %LOCALAPPDATA%\Programs\Ollama` contains the binaries (The installer adds this to your user PATH) - `explorer %HOMEPATH%\.ollama` contains models and configuration -- `explorer %TEMP%` contains temporary executable files in one or more `ollama*` directories ## Uninstall