llm: re-use ollama upstream
This commit is contained in:
parent
854f818f23
commit
3e2e530d49
@ -11,18 +11,19 @@ in
|
|||||||
{
|
{
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = [ ollamaPkg pkgs.aichat ];
|
systemPackages = [ ollamaPkg pkgs.aichat ];
|
||||||
# variables = {
|
variables = {
|
||||||
# OLLAMA_ORIGINS = "*";
|
OLLAMA_ORIGINS = "*";
|
||||||
# };
|
OLLAMA_FLASH_ATTENTION="1";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.ollama = {
|
services.ollama = {
|
||||||
# inherit listenAddress;
|
inherit listenAddress;
|
||||||
|
|
||||||
# enable = true;
|
enable = true;
|
||||||
# acceleration = "cuda";
|
acceleration = "cuda";
|
||||||
# package = ollamaPkg;
|
package = ollamaPkg;
|
||||||
# };
|
};
|
||||||
|
|
||||||
architect.vhost.${frontendDomain} = {
|
architect.vhost.${frontendDomain} = {
|
||||||
dnsInterfaces = [ "tailscale" ];
|
dnsInterfaces = [ "tailscale" ];
|
||||||
@ -56,24 +57,24 @@ in
|
|||||||
|
|
||||||
virtualisation.oci-containers = {
|
virtualisation.oci-containers = {
|
||||||
containers = {
|
containers = {
|
||||||
ollama = {
|
# ollama = {
|
||||||
image = "ollama/ollama:latest";
|
# image = "ollama/ollama:latest";
|
||||||
autoStart = true;
|
# autoStart = true;
|
||||||
extraOptions = [
|
# extraOptions = [
|
||||||
"--pull=always"
|
# "--pull=always"
|
||||||
"--gpus=all"
|
# "--gpus=all"
|
||||||
];
|
# ];
|
||||||
environment = {
|
# environment = {
|
||||||
OLLAMA_ORIGINS = "*";
|
# OLLAMA_ORIGINS = "*";
|
||||||
};
|
# };
|
||||||
volumes = [
|
# volumes = [
|
||||||
"/ollama:/root/.ollama"
|
# "/ollama:/root/.ollama"
|
||||||
];
|
# ];
|
||||||
ports = [
|
# ports = [
|
||||||
"${listenAddress}:${toString ollamaPort}"
|
# "${listenAddress}:${toString ollamaPort}"
|
||||||
"172.17.0.1:${toString ollamaPort}:${toString ollamaPort}"
|
# "172.17.0.1:${toString ollamaPort}:${toString ollamaPort}"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
ollama-webui = {
|
ollama-webui = {
|
||||||
image = "ghcr.io/open-webui/open-webui:main";
|
image = "ghcr.io/open-webui/open-webui:main";
|
||||||
|
Loading…
Reference in New Issue
Block a user