Skip to content

Instantly share code, notes, and snippets.

@prakashjayy
Last active July 31, 2017 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prakashjayy/ee96a4f2dc91e96e0454f6c61ebe682f to your computer and use it in GitHub Desktop.
Save prakashjayy/ee96a4f2dc91e96e0454f6c61ebe682f to your computer and use it in GitHub Desktop.
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