Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ereslibre committed Sep 17, 2024
1 parent 23639e0 commit 0939d72
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 16 deletions.
22 changes: 22 additions & 0 deletions common/docker/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
# Needed by the Nvidia container wrapper.
hardware.graphics.enable32Bit = true;

virtualisation = {
docker = {
enable = true;
# Set this up to debug issues witht the Docker runtime wrappers
# for GPU support. If you don't know what this is about, you
# should probably use `hardware.nvidia-container-toolkit.enable
# = true;` instead.
enableNvidia = true;
rootless = {
enable = true;
# FIXME(ereslibre): this should be done automatically by
# NixOS.
daemon.settings.features.cdi = true;
};
};
};
users.users.ereslibre.extraGroups = ["docker"];
}
6 changes: 1 addition & 5 deletions common/podman/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
users.users.ereslibre.extraGroups = ["podman"];
virtualisation = {
containers.enable = true;
podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
};
podman.enable = true;
};
}
1 change: 1 addition & 0 deletions hulk/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
imports = [
./hardware-configuration.nix
../common/aliases
../common/docker
../common/home-node
../common/nixos
../common/node
Expand Down
12 changes: 1 addition & 11 deletions hulk/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
sensor-cpu = "sudo ${pkgs.lm_sensors}/bin/sensors -j k10temp-pci-00c3 | ${pkgs.jq}/bin/jq '.\"k10temp-pci-00c3\".Tctl.temp1_input'";
};
systemPackages = with pkgs; [
linuxPackages.nvidia_x11
pciutils
];
};
Expand All @@ -46,24 +45,15 @@

hardware = {
nvidia = {
modesetting.enable = true;
nvidiaPersistenced = true;
open = false;
};
graphics.enable = true;
nvidia-container-toolkit.enable = true;
};

nixpkgs.config = {
cudaSupport = true;
cudnnSupport = true;
};

services.xserver.videoDrivers = ["nvidia"];

systemd.services.nvidia-control-devices = {
wantedBy = ["multi-user.target"];
serviceConfig.ExecStart = "${pkgs.linuxPackages.nvidia_x11.bin}/bin/nvidia-smi";
};

hardware.nvidia-container-toolkit.enable = true;
}

0 comments on commit 0939d72

Please sign in to comment.