Hasktorch with Nix
# 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