From 84b1a60feaefd6f8b8626c3b1dc3d22fa8d95e01 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Sun, 1 Dec 2024 19:02:57 +0100 Subject: [PATCH] builder: try gpu computing but GPU doesnt support it --- systems/x86_64-linux/builder/default.nix | 32 ++++++++++++++--- .../builder/hardware-configuration.nix | 35 ++++++++++++------- 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/systems/x86_64-linux/builder/default.nix b/systems/x86_64-linux/builder/default.nix index 5a438f3..fb0d0e0 100644 --- a/systems/x86_64-linux/builder/default.nix +++ b/systems/x86_64-linux/builder/default.nix @@ -6,6 +6,23 @@ { imports = [ ./hardware-configuration.nix ]; + # hardware.opengl = { + # enable = true; + # extraPackages = with pkgs; [ + # rocmPackages.clr.icd + # linuxPackages.amdgpu-pro + # ]; + # }; + + # boot.kernelParams = [ + # "radeon.si_support=0" + # "radeon.cik_support=1" + # "amdgpu.si_support=0" + # "amdgpu.cik_support=1" + # ]; + # boot.extraModulePackages = with config.boot.kernelPackages; [ amdgpu-pro ]; + # boot.blacklistedKernelModules = [ "radeon" ]; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/sda"; @@ -65,16 +82,23 @@ vim htop mc + + # # AMD GPU tools + # pciutils + # nvtopPackages.amd + # linuxPackages.amdgpu-pro ]; - # services.ollama = { - # enable = true; - # acceleration = "cuda"; - # }; + # Ollama used by open-webui as llm backend + services.ollama = { + enable = true; + # acceleration = "rocm"; + }; services.open-webui = { enable = true; port = 8080; openFirewall = true; + host = "builder.julian-mutter.de"; }; services.openssh = { diff --git a/systems/x86_64-linux/builder/hardware-configuration.nix b/systems/x86_64-linux/builder/hardware-configuration.nix index c915166..d0bd254 100644 --- a/systems/x86_64-linux/builder/hardware-configuration.nix +++ b/systems/x86_64-linux/builder/hardware-configuration.nix @@ -1,26 +1,35 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "virtio_pci" + "virtio_scsi" + "sd_mod" + "sr_mod" + ]; + # boot.initrd.kernelModules = [ "amdgpu" ]; # GPU support boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/f088fe8e-bf3d-4a89-98bd-ead9852d381f"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/f088fe8e-bf3d-4a89-98bd-ead9852d381f"; + fsType = "ext4"; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/ab60b5f0-caaa-4a7e-803f-c4c1a6a076dd"; } - ]; + swapDevices = [ { device = "/dev/disk/by-uuid/ab60b5f0-caaa-4a7e-803f-c4c1a6a076dd"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's