Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding models to the docker container #27

Open
TomSlezakowski opened this issue Jul 13, 2015 · 1 comment
Open

Adding models to the docker container #27

TomSlezakowski opened this issue Jul 13, 2015 · 1 comment

Comments

@TomSlezakowski
Copy link

I'm attempting to add a new model to the docker container, but I'm missing something as I can't seem to get it to save.

I use ./enter.sh to enter the container, then run something like;

sudo apt-get install vim

exit the docker and run;

sudo docker commit 89028ee7020d visionai/clouddream

I then restart the containers, however my changes don't seem to be reflected in the now running container. Could you possibly let me know what step I'm missing here or where I'm going wrong?

Many thanks!

@TomSlezakowski TomSlezakowski changed the title Adding models to the docker image Adding models to the docker container Jul 13, 2015
@quantombone
Copy link
Member

I would recommend that you take the visionai/clouddream Docker image and extend it by writing your own Dockerfile. From my understanding of how Docker Hub works, you should not be able to push a container under the visionai/clouddream because visionai is already reserved. For your own debugging sanity, I would recommend naming your custom image something different.

Let's first make a new directory for the new Dockerfile:

cd ~/clouddream/
mkdir custom
cd custom

Now's lets create a simple Dockerfile which extends the visionai one, but downloads the AlexNet model. The file looks like this:

FROM visionai/clouddream

#Download my custom model
RUN /opt/caffe/scripts/download_model_binary.py /opt/caffe/models/bvlc_alexnet

Now's let's build the thing and give it a name like custom/clouddream and we'll be using it on one machine so we won't distribute it to Docker Hub.

#Make sure you are in the custom directory, which has the short Dockerfile inside:
docker build -t custom/clouddream  .

You have now built a custom/clouddream container on your machine, and can go ahead and modify the references inside the Python code to your new model (AlexNet) instead of the default GoogLeNet one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants