Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Last active December 11, 2019 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleverca22/0d7180681a76b6e12a99e86b309c0e52 to your computer and use it in GitHub Desktop.
Save cleverca22/0d7180681a76b6e12a99e86b309c0e52 to your computer and use it in GitHub Desktop.
diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix
index 0f6cb16bf75..fb6e3d6acdc 100644
--- a/pkgs/development/python-modules/pytorch/default.nix
+++ b/pkgs/development/python-modules/pytorch/default.nix
@@ -134,6 +134,7 @@ in buildPythonPackage rec {
'' + lib.optionalString (cudaSupport && cudnn != null) ''
export CUDNN_INCLUDE_DIR=${cudnn}/include
'';
+ postConfigure = "exit 1";
preFixup = ''
function join_by { local IFS="$1"; shift; echo "$*"; }
@@ -203,6 +204,7 @@ in buildPythonPackage rec {
cp -r $out/${python.sitePackages}/torch/lib $dev/lib
cp -r $out/${python.sitePackages}/torch/include $dev/include
cp -r ${src}/c10/* $dev/include/c10/
+ find -name cuda_cmake_macros.h
'';
postFixup = stdenv.lib.optionalString stdenv.isDarwin ''
let
pkgs = import ./. { config.allowUnfree = true; };
in pkgs.stdenv.mkDerivation {
name = "c10";
src = pkgs.python37Packages.pytorch.src;
postUnpack = ''
sourceRoot+=/c10/cuda
echo source root reset to $sourceRoot
'';
nativeBuildInputs = [ pkgs.cmake ];
buildInputs = [ pkgs.cudatoolkit ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment