0

There is an official guide on how to install it that doesn't say much about actually developing in it.

From what I understand, there is a quite big challenge in developing with Docker in general. Not to mention there could be deeper technical complications about going with it for TensorFlow, maybe mostly thanks to GPUs. So there is a lot of stuff to after pulling the docker image...

Does anyone have a step by step guide on how to get development going here?

Community
  • 1
  • 1
cregox
  • 15,711
  • 14
  • 77
  • 111
  • Could you clarify what kind of development you have in mind? Installing it is the start - then you can immediately begin writing models in python+tensorflow. No magic needed. There may be difficulties in trying to maximize performance with respect to CPU scheduling or using GPUs, but that doesn't at all preclude developing, testing, and using models. – dga Nov 14 '15 at 03:39
  • @dga using versioning (I love `git`) and my own text editor (Atom in my case). Not fond of bash ones such as vim or nano. Plus, whatever else that might be important and I'm not realising (like the GPU issue). For instance, I now think there is some importance to run (from the second time onwards) with `docker ps -a` to identify what container was running and then `docker exec -it [container id] bash`. That's far from trivial for who knows nothing of docker. – cregox Nov 14 '15 at 05:27

1 Answers1

0

You could mount a local directory to the docker container so that you can still use your preferred editor in osx. Here's a command to start the container with a mounted directory and run a command:

docker run --name tensorflow --rm -v /Users/me/Code/web/tensorflow_dev:/tensorflow_dev b.gcr.io/tensorflow/tensorflow /bin/sh -c 'cd /tensorflow_dev && python mnist.py'

-v will mount the local directory and the -c will run the specified command. So your flow might look like:

  1. Edit python script in your favorite editor
  2. Run the above command to excute your script

However, I actually use pycharm so that I can place breakpoints and run the python script interactively within the editor.

Hope this helps.

sthomps
  • 3,458
  • 6
  • 29
  • 50