feat(self/ollama): Mistral 7b setup with ollama
This commit is contained in:
parent
8634895181
commit
210816195b
5 changed files with 41 additions and 1 deletions
|
|
@ -7,6 +7,9 @@ let
|
|||
monitor = import ./self_host/monitor.nix {
|
||||
inherit inputs config pkgs lib;
|
||||
};
|
||||
ollama = import ./self_host/ollama.nix {
|
||||
inherit inputs config pkgs lib;
|
||||
};
|
||||
nextcloud = import ./self_host/nextcloud.nix {
|
||||
inherit inputs config pkgs lib;
|
||||
};
|
||||
|
|
@ -16,6 +19,7 @@ in
|
|||
imports = [
|
||||
nextcloud
|
||||
htop
|
||||
ollama
|
||||
monitor
|
||||
];
|
||||
|
||||
|
|
@ -30,6 +34,11 @@ in
|
|||
default = false;
|
||||
description = "Enable the htop";
|
||||
};
|
||||
ollama = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable the ollama";
|
||||
};
|
||||
monitor = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ in
|
|||
"https://nextcloud.enium.eu"
|
||||
"https://htop.enium.eu"
|
||||
"https://monitor.enium.eu"
|
||||
"https://ollama.enium.eu"
|
||||
"http://relance-pas-stp.me:4242"
|
||||
];
|
||||
}];
|
||||
|
|
|
|||
29
services/self_host/ollama.nix
Normal file
29
services/self_host/ollama.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.service.selfhost.ollama;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
ollama = {
|
||||
enable = true;
|
||||
loadModels = [
|
||||
"mistral:7b"
|
||||
];
|
||||
acceleration = "cuda";
|
||||
};
|
||||
|
||||
open-webui = {
|
||||
enable = true;
|
||||
port = 13007;
|
||||
};
|
||||
nginx.virtualHosts."ollama.enium.eu" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:13007";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue