docker ollama
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
pipewire.enable = true;
|
||||
netbird.enable = true;
|
||||
|
||||
ollama.enable = true;
|
||||
ollama.enable = false;
|
||||
wyoming = {
|
||||
enable = true;
|
||||
piper = false;
|
||||
@@ -79,8 +79,11 @@
|
||||
docker = {
|
||||
enable = true;
|
||||
|
||||
nvidia = true;
|
||||
|
||||
portainer.enable = true;
|
||||
pihole.enable = true;
|
||||
ollama.enable = true;
|
||||
};
|
||||
|
||||
virtualization = {
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
config = lib.mkIf config.sysconfig.docker.enable {
|
||||
|
||||
networking.nat.internalInterfaces = [ "docker0" ];
|
||||
|
||||
virtualisation = {
|
||||
docker = {
|
||||
enable = true;
|
||||
|
||||
@@ -1 +1,39 @@
|
||||
{ ... }: {}
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.sysconfig.docker.ollama.enable = with lib; mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.sysconfig.docker.ollama.enable && config.sysconfig.docker.enable) {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
ollama
|
||||
];
|
||||
|
||||
virtualisation.oci-containers.containers.ollama = {
|
||||
image = "ollama/ollama:latest";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "ollama.local";
|
||||
|
||||
ports = [
|
||||
"127.0.0.1:11434:11434"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"vol_ollama:/root/.ollama"
|
||||
];
|
||||
|
||||
cmd = lib.mkIf config.sysconfig.docker.nvidia [
|
||||
"--device=nvidia.com/gpu=all"
|
||||
];
|
||||
|
||||
environment = {
|
||||
OLLAMA_CONTEXT_LENGTH = lib.mkDefault "16000";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "pihole.local";
|
||||
|
||||
ports = [
|
||||
"127.0.0.1:9001:80"
|
||||
"127.0.0.1:53:53/tcp"
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "portainer.local";
|
||||
|
||||
ports = [
|
||||
"127.0.0.1:8000:8000"
|
||||
"127.0.0.1:9000:9000"
|
||||
|
||||
Reference in New Issue
Block a user