Last active
July 27, 2020 12:50
-
-
Save masterdezign/1da54876610843077c32309acce32acb to your computer and use it in GitHub Desktop.
Hasktorch with Nix
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
# First of all make sure Nix is up and running https://nixos.org/nix | |
# Clone Hasktorch | |
git clone https://github.com/hasktorch/hasktorch.git | |
cd hasktorch | |
NIX_PATH="nixpkgs=https://github.com/NixOS/nixpkgs/archive/release-19.09.tar.gz" | |
nix-env -iA cachix -f https://cachix.org/api/v1/install | |
cachix use hasktorch | |
# Option 1: Build examples | |
nix-build -A hasktorch-examples_cpu | |
# Run an example application | |
./result/bin/static-xor-mlp | |
# Option 2, interactive with Stack | |
stack --nix ghci | |
# Option 3 (might be problematic as of 27 July 2020): Launch Jupyter Lab | |
nix-shell ./nix/jupyter-shell.nix --command "jupyter lab" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment