Skip to content

Commit 9f2885b

Browse files
authored
Merge pull request #1786 from rhatdan/convert
Set TMPDIR to /var/tmp if not set
2 parents 19d0e90 + 8b6c7ce commit 9f2885b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

bin/ramalama

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
#!/usr/bin/env python3
22

3+
import os
34
import sys
45

56

67
def main():
78
if not sys.stdout.isatty():
89
sys.stdout.reconfigure(line_buffering=True)
910

11+
if sys.platform != 'win32':
12+
# default TMPDIR environment to /var/tmp on non Windows platforms
13+
os.environ["TMPDIR"] = os.getenv("TMPDIR", "/var/tmp")
14+
1015
sys.path.insert(0, './')
1116
try:
1217
import ramalama

docs/ramalama.1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ although the recommended way is to use the ramalama.conf file.
178178
| RAMALAMA_IN_CONTAINER | Run RamaLama in the default container |
179179
| RAMALAMA_STORE | location to store AI Models |
180180
| RAMALAMA_TRANSPORT | default AI Model transport (ollama, huggingface, OCI) |
181+
| TMPDIR | directory for temporary files. Defaults to /var/tmp if unset.|
181182

182183
## SEE ALSO
183184
**[podman(1)](https://github.com/containers/podman/blob/main/docs/source/markdown/podman.1.md)**, **docker(1)**, **[ramalama.conf(5)](ramalama.conf.5.md)**, **[ramalama-cuda(7)](ramalama-cuda.7.md)**, **[ramalama-macos(7)](ramalama-macos.7.md)**

0 commit comments

Comments
 (0)