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
| { mkDerivation, accelerate, base, stdenv }: | |
| mkDerivation { | |
| pname = "testAcc"; | |
| version = "0.1.0.0"; | |
| src = ./.; | |
| isLibrary = false; |
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
| { nixpkgs ? import <nixpkgs> { config.allowUnfree = true; config.allowBroken = true; }, compiler ? "default", doBenchmark ? false }: | |
| let | |
| inherit (nixpkgs) pkgs; | |
| f = { mkDerivation, accelerate, accelerate-fft | |
| , accelerate-llvm-native, base, Chart, Chart-cairo, Chart-diagrams | |
| , clock, diagrams-cairo, diagrams-lib, formatting, hedgehog, HUnit | |
| , lens-accelerate, stdenv, tasty, tasty-hedgehog, vector |
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
| # 5. example of multiple contents, emacs and vi happily coexisting | |
| editors = buildImage { | |
| name = "editors"; | |
| contents = [ | |
| pkgs.coreutils | |
| pkgs.bash | |
| pkgs.emacs | |
| pkgs.vim | |
| pkgs.nano | |
| ]; |
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
| [nix-shell:~]$ echo $LD_LIBRARY_PATH | |
| /run/opengl-driver/lib | |
| [nix-shell:~]$ python | |
| Python 3.7.4 (default, Jul 8 2019, 18:31:06) | |
| [GCC 7.4.0] on linux | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> import tensorflow as tf | |
| /nix/store/kfa0pylfvrzhpmm90kfr6q2pyr1lswxm-python3-3.7.4-env/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. | |
| _np_qint8 = np.dtype([("qint8", np.int8, 1)]) |
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
| [sundials@testVM:~]$ du -h /var | |
| 4.0K /var/empty | |
| 4.0K /var/tmp | |
| 4.0K /var/lib/udisks2 | |
| du: cannot read directory '/var/lib/private': Permission denied | |
| 4.0K /var/lib/private | |
| du: cannot read directory '/var/lib/waagent': Permission denied | |
| 4.0K /var/lib/waagent | |
| 20K /var/lib/nixos | |
| 4.0K /var/lib/systemd/coredump |
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
| [sundials@testVM:~]$ df -h | |
| Filesystem Size Used Avail Use% Mounted on | |
| devtmpfs 172M 0 172M 0% /dev | |
| tmpfs 1.7G 0 1.7G 0% /dev/shm | |
| tmpfs 856M 13M 844M 2% /run | |
| tmpfs 1.7G 360K 1.7G 1% /run/wrappers | |
| /dev/disk/by-label/nixos 1.5G 1.5G 0 100% / | |
| tmpfs 1.7G 0 1.7G 0% /sys/fs/cgroup | |
| tmpfs 343M 0 343M 0% /run/user/1000 |
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
| sh-3.2$ ./az.sh login | |
| Password: | |
| Unable to find image 'microsoft/azure-cli:latest' locally | |
| latest: Pulling from microsoft/azure-cli | |
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
| with import <nixpkgs> {}; | |
| let | |
| my-R-packages = with rPackages; [ ggplot2 dplyr xts ]; | |
| R-with-my-packages = rWrapper.override{ packages = with rPackages; my-R-packages ++ [ JuniperKernel ]; }; | |
| jupyter-R-kernel = stdenv.mkDerivation { | |
| name = "jupyter-R-kernel"; | |
| buildInputs = [ pythonPackages.notebook R-with-my-packages ]; | |
| unpackPhase = ":"; | |
| installPhase = '' | |
| export HOME=$TMP |
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
| sundials@sundials:~/chebApprox$ nix-shell -E 'with import <nixpkgs> { config.allowUnfree = true; config.allowBroken = true; }; haskellPackages.ghcWithPackages (pkgs: [pkgs.accelerate])' | |
| [nix-shell:~/chebApprox]$ ghci | |
| GHCi, version 8.6.5: http://www.haskell.org/ghc/ :? for help | |
| Prelude> import Data.Array.Accelerate | |
| <no location info>: error: | |
| Could not find module ‘Data.Array.Accelerate’ | |
| It is not a module in the current program, or in any known package. | |
| Prelude> :q |
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
| with import <nixpkgs> {}; | |
| let | |
| my-R-packages = with rPackages; [ ggplot2 dplyr xts ]; | |
| R-with-my-packages = rWrapper.override{ packages = with rPackages; my-R-packages ++ [ JuniperKernel ]; }; | |
| jupyter-R-kernel = stdenv.mkDerivation { | |
| name = "jupyter-R-kernel"; | |
| buildInputs = [ pythonPackages.notebook R-with-my-packages ]; | |
| unpackPhase = ":"; | |
| installPhase = '' | |
| export HOME=$TMP |