Mask R-CNN reproduces stepping on the pit

1. Making a mirror
1. Background: caffe2 is merged into pytorch, clone keeps reporting errors.
My modification:
changed from
RUN git clone --branch master --recursive https://github.com/caffe2/caffe2.git
to
RUN git clone --branch master --recursive https://github.com/pytorch/ pytorch.git

The error is as follows:


Later, I asked the seniors that it was because of network reasons. He said that he could clone to the host computer, and then COPY/ADD in. One point to note here is that if you directly COPY the entire pytorch folder, the default is to copy all the content under pytorch to Below your destination, not the pytorch folder itself, so we should write the following command:
WORKDIR pytorch
COPY ./pytorch pytorch
This will copy the entire pytorch folder.

But then the following problem arose:


报错是说,
CMake Error at proto/CMakeLists.txt:3 (caffe2_protobuf_generate_cpp_py):
  Unknown CMake command "caffe2_protobuf_generate_cpp_py".

So I decided to compile it locally now, and then COPY it in

After trying it, I found that it cannot be compiled locally, otherwise the CMakeLists.txt is all local, so the next method is to download the larger pytorch detectron cocoapi to the host, and then COPY/ADD into the mirror. .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325983751&siteId=291194637