From 16007b68bd9cb495371dbae965519676c27f3cfe Mon Sep 17 00:00:00 2001 From: drbh Date: Tue, 26 Nov 2024 13:55:24 -0500 Subject: [PATCH] feat: adjust impure shell deps and autodocs workflow --- .github/workflows/autodocs.yaml | 2 +- nix/impure-shell.nix | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autodocs.yaml b/.github/workflows/autodocs.yaml index a768f263..5902a13f 100644 --- a/.github/workflows/autodocs.yaml +++ b/.github/workflows/autodocs.yaml @@ -20,7 +20,7 @@ jobs: - name: Install Protocol Buffers compiler run: | sudo apt-get update - sudo apt-get install -y protobuf-compiler libprotobuf-dev + sudo apt-get install -y protobuf-compiler libprotobuf-dev libavutil-dev pkg-config - name: Install Launcher id: install-launcher diff --git a/nix/impure-shell.nix b/nix/impure-shell.nix index a13fd711..0dcabb56 100644 --- a/nix/impure-shell.nix +++ b/nix/impure-shell.nix @@ -8,6 +8,11 @@ which, cudaPackages, openssl, + ffmpeg, + llvmPackages, + gcc, + gcc-unwrapped, + stdenv, pkg-config, poetry, protobuf, @@ -53,6 +58,11 @@ mkShell { buildInputs = [ openssl.dev + ffmpeg.dev + llvmPackages.libclang + gcc.cc + gcc-unwrapped + stdenv ] ++ (with python3.pkgs; [ venvShellHook @@ -81,7 +91,15 @@ mkShell { inputsFrom = [ server ]; - env = lib.optionalAttrs withCuda { + env = { + 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}"; TORCH_CUDA_ARCH_LIST = lib.concatStringsSep ";" python3.pkgs.torch.cudaCapabilities; };