Created
May 21, 2024 02:52
-
-
Save tastycode/04735e448604e3208e366352f47ea967 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs = { | |
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling"; | |
systems.url = "github:nix-systems/default"; | |
devenv.url = "github:cachix/devenv"; | |
devenv.inputs.nixpkgs.follows = "nixpkgs"; | |
nixpkgs-python.url = "github:cachix/nixpkgs-python"; | |
nixpkgs-python.inputs = { nixpkgs.follows = "nixpkgs"; }; | |
}; | |
nixConfig = { | |
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="; | |
extra-substituters = "https://devenv.cachix.org https://cuda-maintainers.cachix.org"; | |
}; | |
outputs = { self, nixpkgs, devenv, systems, ... } @ inputs: | |
let | |
forEachSystem = nixpkgs.lib.genAttrs (import systems); | |
in | |
{ | |
packages = forEachSystem (system: { | |
devenv-up = self.devShells.${system}.default.config.procfileScript; | |
}); | |
devShells = forEachSystem | |
(system: | |
let | |
pkgs = import nixpkgs { | |
inherit system; | |
packageOverrides = pkgs: { | |
stdenv = pkgs.stdenv.override { | |
cc = pkgs.gcc12; | |
}; | |
python310Packages = pkgs.python310Packages.override { | |
overrides = self: super: { | |
vllm = super.vllm.overrideAttrs (oldAttrs: rec { | |
stdenv = oldAttrs.stdenv.override { | |
cc = pkgs.gcc12; | |
}; | |
}); | |
}; | |
}; | |
}; | |
}; | |
in | |
{ | |
default = devenv.lib.mkShell { | |
inherit inputs pkgs; | |
modules = [ | |
{ | |
# https://devenv.sh/reference/options/ | |
languages.python = { | |
enable = true; | |
version = "3.10"; | |
venv.enable = true; | |
}; | |
} | |
]; | |
}; | |
}); | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(nix:devenv-shell-env) (devenv) (venv) root@ded878848f30:/workspace/FastEval# pip install -r requirements.txt | |
Obtaining transformers from git+https://github.com/huggingface/transformers.git#egg=transformers (from -r requirements.txt (line 2)) | |
Cloning https://github.com/huggingface/transformers.git to ./.devenv/state/venv/src/transformers | |
error: subprocess-exited-with-error | |
× git version did not run successfully. | |
│ exit code: 127 | |
╰─> [2 lines of output] | |
git: symbol lookup error: /nix/store/7v7c61ikm7cbd3kbimk9qr8h7pdmyccn-manylinux2014/lib/libc.so.6: undefined symbol: __tunable_is_initialized, version GLIBC_PRIVATE | |
[end of output] | |
note: This error originates from a subprocess, and is likely not a problem with pip. | |
error: subprocess-exited-with-error | |
× git version did not run successfully. | |
│ exit code: 127 | |
╰─> See above for output. | |
note: This error originates from a subprocess, and is likely not a problem with pip. | |
(nix:devenv-shell-env) (devenv) (venv) root@ded878848f30:/workspace/FastEval# cat flake.nix | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment