MAINTAINER caffe...@googlegroups.com
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
wget \
libatlas-base-dev \
libboost-all-dev \
libgflags-dev \
libgoogle-glog-dev \
libhdf5-serial-dev \
libleveldb-dev \
liblmdb-dev \
libopencv-dev \
libprotobuf-dev \
libsnappy-dev \
protobuf-compiler \
python-dev \
python-numpy \
python-pip \
python-scipy && \
rm -rf /var/lib/apt/lists/*
ENV CAFFE_ROOT=/opt/caffe
WORKDIR $CAFFE_ROOT
# FIXME: clone a specific git tag and use ARG instead of ENV once DockerHub supports this.
ENV CLONE_TAG=master
RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/BVLC/caffe.git . && \
for req in $(cat python/requirements.txt) pydot; do pip install $req; done && \
mkdir build && cd build && \
cmake -DCUDA_ARCH_NAME="Manual" -DCUDA_ARCH_BIN="52 60" -DCUDA_ARCH_PTX="60" -DUSE_CUDNN=1 .. && \
make -j"$(nproc)"
ENV PYCAFFE_ROOT $CAFFE_ROOT/python
ENV PYTHONPATH $PYCAFFE_ROOT:$PYTHONPATH
ENV PATH $CAFFE_ROOT/build/tools:$PYCAFFE_ROOT:$PATH
RUN echo "$CAFFE_ROOT/build/lib" >> /etc/ld.so.conf.d/caffe.conf && ldconfig
WORKDIR /workspace
I wanted to run Deep visualization toolbox (https://github.com/yosinski/deep-visualization-toolbox) on top of docker build caffe.
The settings file to build the Deep visualition tool box looks like below.
# Define critical settings and/or override defaults specified in
# settings.py. Copy this file to settings_local.py in the same
# directory as settings.py and edit. Any settings defined here
# will override those defined in settings.py
# Set this to point to your compiled checkout of caffe
caffevis_caffe_root = '/path/to/caffe'
# Load model: caffenet-yos
# Path to caffe deploy prototxt file. Minibatch size should be 1.
caffevis_deploy_prototxt = '%DVT_ROOT%/models/caffenet-yos/caffenet-yos-deploy.prototxt'
# Path to network weights to load.
caffevis_network_weights = '%DVT_ROOT%/models/caffenet-yos/caffenet-yos-weights'
# Other optional settings; see complete documentation for each in settings.py.
caffevis_data_mean = '%DVT_ROOT%/models/caffenet-yos/ilsvrc_2012_mean.npy'
caffevis_labels = '%DVT_ROOT%/models/caffenet-yos/ilsvrc_2012_labels.txt'
caffevis_label_layers = ('fc8', 'prob')
caffevis_prob_layer = 'prob'
caffevis_unit_jpg_dir = '%DVT_ROOT%/models/caffenet-yos/unit_jpg_vis'
caffevis_jpgvis_layers = ['conv1', 'conv2', 'conv3', 'conv4', 'conv5', 'fc6', 'fc7', 'fc8', 'prob']
caffevis_jpgvis_remap = {'pool1': 'conv1', 'pool2': 'conv2', 'pool5': 'conv5'}
def caffevis_layer_pretty_name_fn(name):
return name.replace('pool','p').replace('norm','n')
# Use GPU? Default is True.
#caffevis_mode_gpu = True
# Display tweaks.
# Scale all window panes in UI by this factor
#global_scale = 1.0
# Scale all fonts by this factor
#global_font_size = 1.0
I don't know how to set the below variable, i.e path of the compiled checkout caffe.
# Set this to point to your compiled checkout of caffe
caffevis_caffe_root = '/path/to/caffe'
Does the above toolbox can be run using nvidia-docker ?. My GPU details are CUDA 8 GTX1080
My need is to run the deep visualization toolbox on a model build using the Docker based caffe.
Please let me know if you need more information. Thank you in advance.