Closed vitahlin closed 3 years ago
caffe编译错误:
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/syncedmem.cpp
In file included from ./include/caffe/common.hpp:19:0,
from src/caffe/syncedmem.cpp:1:
./include/caffe/util/device_alternate.hpp:34:10: fatal error: cublas_v2.h: No such file or directory
#include <cublas_v2.h>
^~~~~~~~~~~~~
compilation terminated.
Makefile:593: recipe for target '.build_release/src/caffe/syncedmem.o' failed
make: *** [.build_release/src/caffe/syncedmem.o] Error 1
ERROR: Service 'lib' failed to build: The command '/bin/sh -c echo "\n Begin install caffe..." && cd /opt && curl -o caffe.zip http://118.31.19.101:8080/software/amba/docker_caffe.zip && unzip caffe.zip && cd /opt/caffe/python && pip3 install -i https://mirrors.aliyun.com/pypi/simple -r requirements.txt && cd /opt/caffe && make all && make pycaffe && echo "export PYTHONPATH=/opt/caffe/python:\$PYTHONPATH">>/etc/bash.bashrc && /bin/bash -c "source /etc/bash.bashrc" && rm -rf /opt/caffe.zip && echo "\n Install caffe success"' returned a non-zero code: 2
Error response from daemon: No such image: easy_lib:latest
@lpj0822
src/caffe/layers/cudnn_lcn_layer.cpp:49:15: note: 'CUDA_CHECK' declared here, later in the translation unit
CUDA_CHECK(cudaMalloc(&tempData1, totalSizeInBytes));
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/caffe/layers/cudnn_lcn_layer.cpp: In instantiation of 'caffe::CuDNNLCNLayer<Dtype>::~CuDNNLCNLayer() [with Dtype = double]':
src/caffe/layers/cudnn_lcn_layer.cpp:70:1: required from here
src/caffe/layers/cudnn_lcn_layer.cpp:59:44: error: 'cudnnDestroyTensorDescriptor' was not declared in this scope
cudnnDestroyTensorDescriptor(bottom_desc_);
^
src/caffe/layers/cudnn_lcn_layer.cpp:60:41: error: 'cudnnDestroyTensorDescriptor' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
cudnnDestroyTensorDescriptor(top_desc_);
^
src/caffe/layers/cudnn_lcn_layer.cpp:59:44: note: 'cudnnDestroyTensorDescriptor' declared here, later in the translation unit
cudnnDestroyTensorDescriptor(bottom_desc_);
^
src/caffe/layers/cudnn_lcn_layer.cpp:63:23: error: 'cudnnDestroy' was not declared in this scope
cudnnDestroy(handle_);
^
src/caffe/layers/cudnn_lcn_layer.cpp:66:11: error: 'cudaFree' was not declared in this scope
cudaFree(tempData1);
~~~~~~~~^~~~~~~~~~~
src/caffe/layers/cudnn_lcn_layer.cpp:67:11: error: 'cudaFree' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
cudaFree(tempData2);
~~~~~~~~^~~~~~~~~~~
src/caffe/layers/cudnn_lcn_layer.cpp:66:11: note: 'cudaFree' declared here, later in the translation unit
cudaFree(tempData1);
~~~~~~~~^~~~~~~~~~~
Makefile:593: recipe for target '.build_release/src/caffe/layers/cudnn_lcn_layer.o' failed
目前来看,替换底层镜像的话,会出现比较多的编译问题,好像不是因为底层镜像问题。
base
镜像标签没有处理,更新标签,继续测试
Mac上base
caffe
编译通过,opencv
失败
先不改base,看看lab。
测试,base
和runtime
镜像caffe
编译都会出问题
不更换cuda版本,研究其他的镜像大小压缩方案
方案说明:替换cuda的基础镜像,采用更小的base镜像,cuda-base, cuda-runtime, cuda-devel区别:https://stackoverflow.com/questions/56405159/what-is-the-difference-between-devel-and-runtime-tag-for-a-docker-container