Last active
August 12, 2018 13:46
-
-
Save sveitser/3ccd1ae2b2ff1e14190826fbc5f41201 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
| # To later refer to the path of the tarball in the nix store. | |
| # Is there a better way? | |
| { src ? builtins.fetchTarball { | |
| url = "https://releases.nixos.org/nixpkgs/nixpkgs-18.09pre148461.bf1b50cbc8f/nixexprs.tar.xz"; | |
| sha256 = "1kp55q3bp7lrs7qjpyp4mfngw89jrf7rbqhrrz9zwg27rz481gfa"; | |
| } }: | |
| with import ( src ) { }; | |
| let phonemizer = pythonPackages.buildPythonPackage rec { | |
| name = "phonemizer"; | |
| version = "0.1"; | |
| src = fetchFromGitHub { | |
| owner = "bootphon"; | |
| repo = "phonemizer"; | |
| rev = "c41e5e10c35f1ce8279565f2f380dd66a59a288a"; | |
| sha256 = "0k2y4pfbh0g2dvbwhs4dpin2mm6id1qzlq4aphrdfnc3ygrfzbjp"; | |
| }; | |
| propagatedBuildInputs = [ | |
| speech_tools | |
| (python27Packages.joblib.overridePythonAttrs ( | |
| old: { | |
| checkPhase = '' | |
| py.test -k 'not test_disk_used and not test_nested_parallel_warnings and not without_lz4 and not pickle_deprecated' joblib/test | |
| ''; | |
| })) | |
| ]; | |
| }; | |
| # pytorch = python2Packages.pytorchWithCuda; | |
| # downgrade cuda to v8 | |
| pytorchPkg = import "${src}/pkgs/development/python-modules/pytorch"; | |
| args = builtins.intersectAttrs ( builtins.functionArgs pytorchPkg ) pythonPackages; | |
| pytorch = callPackage pytorchPkg ( args // { | |
| cudatoolkit = cudatoolkit_8; | |
| cudaSupport = true; | |
| }); | |
| in mkShell rec { | |
| buildInputs = [ | |
| python2 | |
| phonemizer | |
| python27Packages.tqdm | |
| python27Packages.numpy | |
| python27Packages.scipy | |
| (pytorch.overridePythonAttrs ( | |
| old: rec { | |
| version = "0.1.12"; | |
| src = fetchFromGitHub { | |
| owner = "pytorch"; | |
| repo = "pytorch"; | |
| rev = "v${version}"; | |
| fetchSubmodules = true; | |
| sha256 = "0r8mf4xya76gz83y5z3hfxh0rydkydafhipl8g7d0bfrgw961jy9"; | |
| }; | |
| # This setup.py calls out to git. | |
| buildInputs = old.buildInputs ++ [ gitMinimal ]; | |
| # There are some failing tests | |
| checkPhase = '' | |
| # test/run_test.sh | |
| ''; | |
| } | |
| )) | |
| ]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment