diff --git a/flake.nix b/flake.nix index ac4331c2..7ddd3b92 100644 --- a/flake.nix +++ b/flake.nix @@ -176,11 +176,15 @@ ''; }; - dockerImage = pkgs.callPackage nix/docker.nix { + # Use plain nixpkgs without overlays for dockerTools. dockerTools + # uses a Python package for computing the layers from the transitive + # closure. However, this needs a lot of rebuilds due to our overlay. + + dockerImage = nixpkgs.legacyPackages.${system}.callPackage nix/docker.nix { text-generation-inference = default; }; - dockerImageStreamed = pkgs.callPackage nix/docker.nix { + dockerImageStreamed = nixpkgs.legacyPackages.${system}.callPackage nix/docker.nix { text-generation-inference = default; stream = true; }; diff --git a/nix/docker.nix b/nix/docker.nix index dc4c823d..a8fc256e 100644 --- a/nix/docker.nix +++ b/nix/docker.nix @@ -18,6 +18,10 @@ build { Env = [ "HF_HOME=/data" "PORT=80" + # The CUDA container toolkit will mount the driver shim into the + # container. We just have to ensure that the dynamic loader finds + # the libraries. + "LD_LIBRARY_PATH=/usr/lib64" ]; };