As machine learning is developing more and more one of the issues for a beginner to prototype is setting up the machine. Remember just how many times you had to reinstall things for whatever failure. And after crafting the special snowflake that has all those packages you would have to go over the entire process.

That is where nix comes in. With it’s declarative style of infrastracture provisioning you can make setting up your infrastructure a breeze. There are plenty of packages already available and if they are not people are contributing them activly. Small but vibrant comunity makes machine learning on nixos a perspective option for beginner that wants to have easy prototyping environment.

First thing you need to do in order to start is to go and get NixOS. Then create your configuration with all machine learning libraries and enjoy.

UPDATE: here it is done.

  • so you put this in folder for example machine learning
  • name it default.nix
  • run nix-shell --pure in that dir and there you go now you have all of that stuff

with import <nixpkgs> {};
with pkgs.python27Packages;
buildPythonPackage  {
        name = "impurePythonEnv";
        buildInputs = [
                        git
                        libxml2
                        libxslt
                        libzip
                        pythonFull
                        julia
                        curl
                        wget
                        which
                        m4
                        pythonPackages.virtualenv
                        pythonPackages.jupyter
                        pythonPackages.pip
                        pythonPackages.scikitlearn
                        pythonPackages.ipython
                        pythonPackages.blaze
                        pythonPackages.dask
                        pythonPackages.datashape
                        pythonPackages.odo
                        pythonPackages.numpy
                        pythonPackages.pandas
                        pythonPackages.scipy
                        pythonPackages.matplotlib
                        pythonPackages.pybrain
                        pythonPackages.Theano
                        pythonPackages.tensorflow
                        torchPackages.torch
                        torch-repl
                        octave
                        pythonPackages.simpleai
                        pythonPackages.Keras
                        pythonPackages.Lasagne
                        pythonPackages.ndg-httpsclient
                        pythonPackages.Quandl
                        stdenv
                        zlib ];
        src = null;

        shellHook = ''
                unset http_proxy
                export GIT_SSL_CAINFO=/etc/ssl/certs/ca-bundle.crt
                '';

        extraCmds = ''
                unset http_proxy # otherwise downloads will fail ("nodtd.invalid")
                export GIT_SSL_CAINFO=/etc/ssl/certs/ca-bundle.crt
                '';
}