mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-22 15:32:08 +00:00
Cleanup impure Nix shell
This commit is contained in:
parent
167c6f06ab
commit
98392a7a3f
@ -5,14 +5,11 @@
|
|||||||
cmake,
|
cmake,
|
||||||
isort,
|
isort,
|
||||||
ninja,
|
ninja,
|
||||||
|
rustPlatform,
|
||||||
which,
|
which,
|
||||||
cudaPackages,
|
cudaPackages,
|
||||||
openssl,
|
openssl,
|
||||||
ffmpeg,
|
ffmpeg,
|
||||||
llvmPackages,
|
|
||||||
gcc,
|
|
||||||
gcc-unwrapped,
|
|
||||||
stdenv,
|
|
||||||
pkg-config,
|
pkg-config,
|
||||||
poetry,
|
poetry,
|
||||||
protobuf,
|
protobuf,
|
||||||
@ -31,6 +28,7 @@
|
|||||||
mkShell {
|
mkShell {
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
[
|
[
|
||||||
|
rustPlatform.bindgenHook
|
||||||
black
|
black
|
||||||
isort
|
isort
|
||||||
pkg-config
|
pkg-config
|
||||||
@ -58,11 +56,7 @@ mkShell {
|
|||||||
buildInputs =
|
buildInputs =
|
||||||
[
|
[
|
||||||
openssl.dev
|
openssl.dev
|
||||||
ffmpeg.dev
|
ffmpeg
|
||||||
llvmPackages.libclang
|
|
||||||
gcc.cc
|
|
||||||
gcc-unwrapped
|
|
||||||
stdenv
|
|
||||||
]
|
]
|
||||||
++ (with python3.pkgs; [
|
++ (with python3.pkgs; [
|
||||||
venvShellHook
|
venvShellHook
|
||||||
@ -91,15 +85,7 @@ mkShell {
|
|||||||
|
|
||||||
inputsFrom = [ server ];
|
inputsFrom = [ server ];
|
||||||
|
|
||||||
env = {
|
env = lib.optionalAttrs withCuda {
|
||||||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
|
||||||
CPATH = "${gcc-unwrapped}/lib/gcc/${stdenv.hostPlatform.config}/${gcc-unwrapped.version}/include";
|
|
||||||
BINDGEN_EXTRA_CLANG_ARGS = builtins.concatStringsSep " " [
|
|
||||||
"-I${gcc.libc.dev}/include"
|
|
||||||
"-I${gcc}/lib/gcc/x86_64-unknown-linux-gnu/${gcc.version}/include"
|
|
||||||
"-I${llvmPackages.libclang.lib}/lib/clang/${llvmPackages.libclang.version}/include"
|
|
||||||
];
|
|
||||||
} // lib.optionalAttrs withCuda {
|
|
||||||
CUDA_HOME = "${lib.getDev cudaPackages.cuda_nvcc}";
|
CUDA_HOME = "${lib.getDev cudaPackages.cuda_nvcc}";
|
||||||
TORCH_CUDA_ARCH_LIST = lib.concatStringsSep ";" python3.pkgs.torch.cudaCapabilities;
|
TORCH_CUDA_ARCH_LIST = lib.concatStringsSep ";" python3.pkgs.torch.cudaCapabilities;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user