Skip to content

Commit

Permalink
Fix DVAP's caffe version problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkunic committed Apr 1, 2019
1 parent b31307d commit bcd5871
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
22 changes: 20 additions & 2 deletions dockerfiles/Dockerfile.DVAP
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bvlc/caffe:gpu
FROM nvidia/cuda:8.0-cudnn5-devel

LABEL maintainer="Toni Kunic <[email protected]>"

Expand Down Expand Up @@ -34,6 +34,24 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
git && \
rm -rf /var/lib/apt/lists/*

################################################################################
### @wenguanwang's implementation depends on HED's caffe.

COPY models/docker/DVAP/model/Makefile.config /opt/Makefile.config

RUN git clone https://github.com/s9xie/hed.git /opt/caffe && \
cd /opt/caffe && \
protoc src/caffe/proto/caffe.proto --cpp_out=. && \
mkdir include/caffe/proto && \
mv src/caffe/proto/caffe.pb.h include/caffe/proto && \
mv /opt/Makefile.config /opt/caffe/ && \
make -j && \
make tools && \
make pycaffe

################################################################################
### smiler_tools

COPY ./smiler_tools /tmp/smiler_tools
RUN pip install /tmp/smiler_tools

Expand All @@ -46,4 +64,4 @@ VOLUME ["/opt/output_vol"]

WORKDIR /opt/model

CMD ["/bin/bash"]
CMD ["/bin/bash"]
4 changes: 1 addition & 3 deletions models/docker/DVAP/model/Makefile.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1

OPENCV_VERSION := 3

# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# CUSTOM_CXX := g++
Expand Down Expand Up @@ -45,7 +43,7 @@ BLAS := atlas

# This is required only if you will compile the matlab interface.
# MATLAB directory should contain the mex binary in /bin.
MATLAB_DIR := /usr/local/MATLAB/R2015a
# MATLAB_DIR := /usr/local
# MATLAB_DIR := /Applications/MATLAB_R2012b.app

# NOTE: this is required only if you will compile the python interface.
Expand Down
2 changes: 2 additions & 0 deletions models/docker/DVAP/model/run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import time
import cv2

sys.path.insert(0, '/opt/caffe/python')

import caffe

from smiler_tools.runner import run_model
Expand Down

0 comments on commit bcd5871

Please sign in to comment.