Skip to content

Instantly share code, notes, and snippets.

@prakashjayy
Last active Jul 31, 2017
Embed
What would you like to do?
A simple Dockerfile for running Deep Learning models using Volumes
# This is the docker image available. I am using cpu version here. If needed there is gpu version available.
FROM bvlc/caffe:cpu
# Copy the file into docker
COPY requirements.txt requirements.txt
# Run the copied file
RUN pip install -r requirements.txt
# create a folder called model1 and copy all the files in the folder into that folder
ADD . /model1
# Make model1 your work directory
WORKDIR /model1
# Create volumes (folders). one (data) to store data and the other(notebooks) to save your code.
VOLUME ["/model1/data", "/model1/notebooks"]
# Expose your port 8888
EXPOSE 8888
# Run the following command to give a token(password) to your jupyter notebook.
CMD jupyter notebook --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token='demo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment