Open visionlineNP opened 5 years ago
Also seeing this. Perhaps a nightly build issue?
Looks like this commit broke the build: c003e5af0a
To work around it, you can make the following modifications to the Dockerfile after the git clone.
# Clone the Detectron repository
RUN git clone https://github.com/facebookresearch/detectron /detectron
WORKDIR /detectron
RUN git checkout c003e5af0a
I am stuck with the exact same issue. I tried the above changes to the dockerfile but the build still fails. Any help/suggestion will be appreciated!
-- Build files have been written to: /detectron/build
make[1]: Entering directory '/detectron/build'
make[2]: Entering directory '/detectron/build'
make[3]: Entering directory '/detectron/build'
make[3]: Entering directory '/detectron/build'
[ 20%] Building NVCC (Device) object CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o
Scanning dependencies of target caffe2_detectron_custom_ops
make[3]: Leaving directory '/detectron/build'
make[3]: Entering directory '/detectron/build'
[ 40%] Building CXX object CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/zero_even_op.cc.o
/detectron/detectron/ops/zero_even_op.cc: In member function 'bool caffe2::ZeroEvenOp<T, Context>::RunOnDevice() [with T = float; Context = caffe2::CPUContext]':
/detectron/detectron/ops/zero_even_op.cc:33:27: error: 'class caffe2::Tensor
I solved it by following the suggestion from here: https://github.com/facebookresearch/Detectron/issues/756#issuecomment-445178752
# Use Caffe2 image as parent image
FROM caffe2/caffe2:snapshot-py2-cuda9.0-cudnn7-ubuntu16.04
RUN mv /usr/local/caffe2 /usr/local/caffe2_build
ENV Caffe2_DIR /usr/local/caffe2_build
ENV PYTHONPATH /usr/local/caffe2_build:${PYTHONPATH}
ENV LD_LIBRARY_PATH /usr/local/caffe2_build/lib:${LD_LIBRARY_PATH}
# Clone the Detectron repository
RUN git clone https://github.com/facebookresearch/detectron /detectron
RUN cd /detectron && git checkout d56e267
# Install Python dependencies
RUN pip install -r /detectron/requirements.txt
# Install the COCO API
RUN git clone https://github.com/cocodataset/cocoapi.git /cocoapi
WORKDIR /cocoapi/PythonAPI
RUN make install
# Go to Detectron root
WORKDIR /detectron
# Set up Python modules
RUN make
# [Optional] Build custom ops
RUN make ops
The docker image fails to build, stopping on step 13/13, the build of Caffe2. The issue is in the build of detectron.
Just ran
as described by the install instructions.