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
dddb72e0
Commit
dddb72e0
authored
Sep 10, 2024
by
Michael Yang
Browse files
add *_proxy for debugging
parent
bb6a086d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
envconfig/config.go
envconfig/config.go
+14
-0
No files found.
envconfig/config.go
View file @
dddb72e0
...
@@ -293,7 +293,20 @@ func AsMap() map[string]EnvVar {
...
@@ -293,7 +293,20 @@ func AsMap() map[string]EnvVar {
"OLLAMA_RUNNERS_DIR"
:
{
"OLLAMA_RUNNERS_DIR"
,
RunnersDir
(),
"Location for runners"
},
"OLLAMA_RUNNERS_DIR"
:
{
"OLLAMA_RUNNERS_DIR"
,
RunnersDir
(),
"Location for runners"
},
"OLLAMA_SCHED_SPREAD"
:
{
"OLLAMA_SCHED_SPREAD"
,
SchedSpread
(),
"Always schedule model across all GPUs"
},
"OLLAMA_SCHED_SPREAD"
:
{
"OLLAMA_SCHED_SPREAD"
,
SchedSpread
(),
"Always schedule model across all GPUs"
},
"OLLAMA_TMPDIR"
:
{
"OLLAMA_TMPDIR"
,
TmpDir
(),
"Location for temporary files"
},
"OLLAMA_TMPDIR"
:
{
"OLLAMA_TMPDIR"
,
TmpDir
(),
"Location for temporary files"
},
// Informational
"HTTP_PROXY"
:
{
"HTTP_PROXY"
,
String
(
"HTTP_PROXY"
)(),
"HTTP proxy"
},
"HTTPS_PROXY"
:
{
"HTTPS_PROXY"
,
String
(
"HTTPS_PROXY"
)(),
"HTTPS proxy"
},
"NO_PROXY"
:
{
"NO_PROXY"
,
String
(
"NO_PROXY"
)(),
"No proxy"
},
}
if
runtime
.
GOOS
!=
"windows"
{
// Windows environment variables are case-insensitive so there's no need to duplicate them
ret
[
"http_proxy"
]
=
EnvVar
{
"http_proxy"
,
String
(
"http_proxy"
)(),
"HTTP proxy"
}
ret
[
"https_proxy"
]
=
EnvVar
{
"https_proxy"
,
String
(
"https_proxy"
)(),
"HTTPS proxy"
}
ret
[
"no_proxy"
]
=
EnvVar
{
"no_proxy"
,
String
(
"no_proxy"
)(),
"No proxy"
}
}
}
if
runtime
.
GOOS
!=
"darwin"
{
if
runtime
.
GOOS
!=
"darwin"
{
ret
[
"CUDA_VISIBLE_DEVICES"
]
=
EnvVar
{
"CUDA_VISIBLE_DEVICES"
,
CudaVisibleDevices
(),
"Set which NVIDIA devices are visible"
}
ret
[
"CUDA_VISIBLE_DEVICES"
]
=
EnvVar
{
"CUDA_VISIBLE_DEVICES"
,
CudaVisibleDevices
(),
"Set which NVIDIA devices are visible"
}
ret
[
"HIP_VISIBLE_DEVICES"
]
=
EnvVar
{
"HIP_VISIBLE_DEVICES"
,
HipVisibleDevices
(),
"Set which AMD devices are visible"
}
ret
[
"HIP_VISIBLE_DEVICES"
]
=
EnvVar
{
"HIP_VISIBLE_DEVICES"
,
HipVisibleDevices
(),
"Set which AMD devices are visible"
}
...
@@ -302,6 +315,7 @@ func AsMap() map[string]EnvVar {
...
@@ -302,6 +315,7 @@ func AsMap() map[string]EnvVar {
ret
[
"HSA_OVERRIDE_GFX_VERSION"
]
=
EnvVar
{
"HSA_OVERRIDE_GFX_VERSION"
,
HsaOverrideGfxVersion
(),
"Override the gfx used for all detected AMD GPUs"
}
ret
[
"HSA_OVERRIDE_GFX_VERSION"
]
=
EnvVar
{
"HSA_OVERRIDE_GFX_VERSION"
,
HsaOverrideGfxVersion
(),
"Override the gfx used for all detected AMD GPUs"
}
ret
[
"OLLAMA_INTEL_GPU"
]
=
EnvVar
{
"OLLAMA_INTEL_GPU"
,
IntelGPU
(),
"Enable experimental Intel GPU detection"
}
ret
[
"OLLAMA_INTEL_GPU"
]
=
EnvVar
{
"OLLAMA_INTEL_GPU"
,
IntelGPU
(),
"Enable experimental Intel GPU detection"
}
}
}
return
ret
return
ret
}
}
...
...
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