Skip to content

Commit

Permalink
fix: add ld_preload to nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Jun 29, 2023
1 parent fd89d34 commit 45070d7
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,12 @@
python = pkgs.python310;
poetry = pkgs.poetry;
in {
# _module.args.pkgs = import nixpkgs {
# inherit system;
# config.allowUnfree = true;
# config.cudaSupport = true;
# };
packages = {
default = poetry2nix.legacyPackages.${system}.mkPoetryApplication {
inherit python;
projectDir = ./.;
preferWheels = true;
overrides = poetry2nix.legacyPackages.${system}.overrides.withDefaults (self: super: {
ml-dtypes = super.ml-dtypes.overridePythonAttrs (old: {
buildInputs = (old.buildInputs or []) ++ [super.setuptools super.pybind11];
});
sentence-transformers = super.sentence-transformers.overridePythonAttrs (old: {
buildInputs = (old.buildInputs or []) ++ [super.setuptools];
});
Expand All @@ -59,10 +51,8 @@
devShells.default = pkgs.mkShell {
packages = [poetry python];
POETRY_VIRTUALENVS_IN_PROJECT = true;
LD_LIBRARY_PATH = lib.makeLibraryPath (with pkgs; [
stdenv.cc.cc
zlib
]);
LD_LIBRARY_PATH = lib.makeLibraryPath (with pkgs; [stdenv.cc.cc zlib]);
LD_PRELOAD = "/usr/lib/${system}-gnu/libcuda.so";
shellHook = ''
${lib.getExe poetry} env use ${lib.getExe python}
${lib.getExe poetry} install --all-extras --no-root
Expand Down

0 comments on commit 45070d7

Please sign in to comment.