The story begins with Caffe, an excellent library for creating and training neural networks both on CPU and on GPU. The property particularly appealing to me is, that I can seimply download a pretrained Neural Network from Caffe Model Zoo and adjust it to my needs(a.k.a. do transfer learning).
At first my plan was to install Caffe on my MacOSX. My heart didn’t faint when I saw thin the installation guide on Caffe homepage
This route is not for the faint of heart. (…) If that is not an option, take a deep breath and carry on.
Actually, I was pretty advanced with the walkthrough but then I stumbled upon that quote:
(…) Then, whenever you want to update homebrew, switch back to the master branches, do the update, rebase the caffe branches onto master and fix any conflicts.
No, thank you!
Alternative way - Docker
I found this Docker Container out there and used it - this time, flawlessly. However, I desperately wanted to have Jupyter installed inside Docker, so that I can easily visualize images like this.
I will not show the whole walkthrough as you can simply download my Docker Container but I wanted to highlight how much fun it is to create your own container.
First Dockerfile
Let’s create a Dockerfile in some directory.
Good! Let’s try it out!
This should take a while as you need to download Ubuntu and then you should see sth like that:
Let’s see what we’ve got installed
It would be nice to add /opt/conda/bin to $PATH. Does it mean that I’ll need to provision the whole container from scratch? Let’s see!
Extending Dockerfile
Let’s add this line to the Dockerfile:
That was quick! If you track carefully the sha numbers you will see that Docker used intermediate containers (like 8868ca69776f and 6b5d1d268411) that were build during the previous build of Dockerfile. Note that this works as long as you append to Dockerfile.
Let’s take a look at these images:
Summary
Docker is truely an amazing technology I will definitely exploit more often.