Installation Instructions for MacOSX
Open the Terminal Application - using spotlight search (by pressing the cmd + space bar simultaneously and typing terminal) or through your gui like this
To install in your home directory:
cd ~into the command-line prompt and
- Execute the line by pressing the return key on your keyboard
Retrieve all of the code for this workshop by executing
git clone https://github.com/AccelAI/Image-Classification-TensorFlow.git(if you haven't used
gitbefore, you may be prompted to install Xcode -- do it!)
Install the Docker "Stable channel" (if you are already using an older version of Docker and run into installation issues downstream, try updating to the latest version of Docker)
Click on the "Get Docker for Mac (Stable)" button as pictured below.
Docker is a system to build self contained versions of a Linux operating system running on your machine. When you install and run TensorFlow via Docker it completely isolates the installation from pre-existing packages on your machine.
Start Docker, e.g., using spotlight search (by pressing the cmd + space bar) or Finder to navigate to your Applications folder and double-clicking on the Docker icon
Download TensorFlow by executing
docker run -it gcr.io/tensorflow/tensorflow:latest-devel
Check your installation of TensorFlow in the Docker container - in the terminal execute the following:
$ python ... >>> import tensorflow as tf >>> hello = tf.constant('Hello, TensorFlow!') >>> sess = tf.Session() >>> print(sess.run(hello)) Hello, TensorFlow! >>> a = tf.constant(10) >>> b = tf.constant(32) >>> print(sess.run(a + b)) 42 >>>
Open a new terminal window by pressing cmd + t and move into the workshop directory by executing
Link this directory to your Docker container by executing
docker run -it --rm --name tf -v ~/Image-Classification-TensorFlow:/notebooks/ -p 8888:8888 -p 6006:6006 tensorflow/tensorflow
You can access the bash in your Docker container through the terminal by executing this command instead:
docker run -it --rm --name tf -v ~/Image-Classification-TensorFlow:/notebooks/ -p 8888:8888 -p 6006:6006 tensorflow/tensorflow /bin/sh
More details on sharing files from your local machine into a Docker container can be found here: https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine
Click the link in your terminal while holding down the cmd key to launch Jupyter in your browser
Return to the lab README for further instructions.
You can shutdown the Jupyter notebook by returning to the Terminal session that is running it and hitting the ctrl and c keys simultaneously on your keyboard.
You can restart the Jupyter notebook later by following steps nine and ten alone.