Imran's personal blog

November 21, 2016

Docker, Tensorflow, and scikit-learn on Windows

Filed under: Uncategorized — ipeerbhai @ 12:58 am

I wanted to play around with the docker version of tensorflow while I’m trying to fix build breaks on the gpu-accelerated Windows TS deployment I’m playing with.

There’s already a TS docker image.  I needed to get it and modify it.  Here’s the steps I did to do that.

Perquisites:

Have a Windows Machine running Docker, either via VirtualBox or Hyper-V.  You’ll need to know how to set a port forwarding rule to the default docker VM.

Steps:

  1. pull the image.   “docker pull  gcr.io/tensorflow/tensorflow”
  2. run the image “docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow”
  3. Exec a shell:
    1. “docker ps” ( find the container ID )
    2. “docker exec -it [IMAGE] bash
  4. install scikit-learn via pip in the image: pip install scikit-learn
  5. exit the bash shell
  6. Create a port forward rule from localhost:[PORT] to [default:8888].
  7. shutdown the jupyter notebook running by default in the TS image.
  8. docker commit [IMAGE] docker-local

You can now run the image you created with:

docker run -it -p 8888:8888 tensorflow-local

This gives you a jupyter notebook server with TS and scikit-learn as a docker machine.

Now, if only nvidea-docker would work on Windows.  A man can dream…

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: