Tensorflow haskell - ku-fpg/blackboard GitHub Wiki

Installing Tensorflow-haskell

Docker Method (This is the prefered method and seeems like the best future proof method to me):

  1. Install docker for mac: https://store.docker.com/editions/community/docker-ce-desktop-mac?tab=description

  2. After docker is installed open a terminal and navigate to what ever workspace you want TensorFlow to be in.

  3. enter the follow commands

    git clone --recursive https://github.com/tensorflow/haskell.git tensorflow-haskell

    cd tensorflow-haskell

  4. Now you need to edit the stack.yaml file to include the following lines of text at the bottom:

    docker:

     `enable: true`
    
     `set-user: true`
    
     `run-args: ["--ulimit=nofile=60000"]​`
    
  5. Now back on the terminal enter the following lines:

    IMAGE_NAME=tensorflow/haskell:v0

    docker build -t $IMAGE_NAME docker

    stack --docker --docker-image=$IMAGE_NAME setup

    stack --docker --docker-image=$IMAGE_NAME test

To test a demo application do the following:

  1. enter the following commands

    cd tensorflow-mnist

    stack --docker --docker-image=$IMAGE_NAME build --exec Man