docker中遇到的坑

2021-09-26 09:43:45 字數 4118 閱讀 2886

------------重點分割線,掉坑是我進步的動力,有時候真的情願不進步也不想掉坑啊啊啊啊-------------------------------------------

apt-get update
但是在執行update的時候執行到23步之後無法執行下去,可能是由於第一次在執行到23的時候出現斷網,然後使用ctrl+c打斷了跟新,反正之後就一直斷在這一步。

docker pull ufoym/deepo:cpu
參考:

刪除映象bvlc/caffe的時候報錯,提示有子映象沒有刪除,所以先刪除子映象caffe-mnist

刪除子映象的被容器使用

檢視後發現caffe-mnist有很多容器,乙個乙個刪除太麻煩了,所以就乾脆全部一起刪除

先停止全部容器,然後刪除全部容器,檢視確認容器刪除

成功刪除兩個caffe的映象

emmmmm

所以,那就,換乙個映象吧~~~

所以,那就,直接複製出來改好了再傳回去吧~~~~

裡面提供了乙個叫做deepo的映象,在映象裡面已經安裝了包括caffe,caffe2,tensoflow,torch等等深度學習框架。有cpu和gpu版本。

docker pull ufoym/deepo
在之前掉過乙個坑,如果直接使用映象鏈結pycharm的話,可能只能將映象中的python包匯入到pycharm裡面去,但是比如caffe這種需要在環境中編譯得到的就沒法載入,所以需要將映象的容器裡面的python直譯器匯入到pycharm裡面,這個時候就需要使用ssh來鏈結了。

解決:

nvcc src/caffe/3rdparty/reduce.cu

nvcc warning : the 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (use -wno-deprecated-gpu-targets to suppress warning).

nvcc warning : the 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (use -wno-deprecated-gpu-targets to suppress warning).

src/caffe/3rdparty/reduce.cu(44): error: identifier "__shfl_down" is undefined

detected during:

instantiation of "t ctareduce::reduce(int, t, ctareduce::storage &, int, rop) [with nt=128, t=float, rop=ctc_helper::add]"

(76): here

instantiation of "void reduce_rows(iop, rop, const t *, t *, int, int) [with nt=128, iop=ctc_helper::negate, rop=ctc_helper::add, t=float]"

(124): here

instantiation of "void reducehelper::impl(iof, rof, const t *, t *, int, int, __nv_bool, cudastream_t) [with t=float, iof=ctc_helper::negate, rof=ctc_helper::add]"

(139): here

instantiation of "ctcstatus_t reduce(iof, rof, const t *, t *, int, int, __nv_bool, cudastream_t) [with t=float, iof=ctc_helper::negate, rof=ctc_helper::add]"

(149): here

src/caffe/3rdparty/reduce.cu(44): error: identifier "__shfl_down" is undefined

detected during:

instantiation of "t ctareduce::reduce(int, t, ctareduce::storage &, int, rop) [with nt=128, t=float, rop=ctc_helper::maximum]"

(76): here

instantiation of "void reduce_rows(iop, rop, const t *, t *, int, int) [with nt=128, iop=ctc_helper::identity, rop=ctc_helper::maximum, t=float]"

(124): here

instantiation of "void reducehelper::impl(iof, rof, const t *, t *, int, int, __nv_bool, cudastream_t) [with t=float, iof=ctc_helper::identity, rof=ctc_helper::maximum]"

(139): here

instantiation of "ctcstatus_t reduce(iof, rof, const t *, t *, int, int, __nv_bool, cudastream_t) [with t=float, iof=ctc_helper::identity, rof=ctc_helper::maximum]"

(157): here

2 errors detected in the compilation of "/tmp/tmpxft_00000e20_00000000-14_reduce.compute_20.cpp1.ii".

makefile:594: recipe for target '.build_release/cuda/src/caffe/3rdparty/reduce.o' failed

make: *** [.build_release/cuda/src/caffe/3rdparty/reduce.o] error 1ce.o' failí

解決方法參考

修改如下,上面被#注釋的是原來的,下面沒有注釋的是新的,直接刪除了sm_20和sm_21兩行

#cuda_arch := -gencode arch=compute_20,code=sm_20 \

# -gencode arch=compute_20,code=sm_21 \

# -gencode arch=compute_30,code=sm_30 \

# -gencode arch=compute_35,code=sm_35 \

# -gencode arch=compute_50,code=sm_50 \

# -gencode arch=compute_50,code=compute_50

cuda_arch := -gencode arch=compute_30,code=sm_30 \

-gencode arch=compute_35,code=sm_35 \

-gencode arch=compute_50,code=sm_50 \

-gencode arch=compute_50,code=compute_50z×óu?¥

docker簡單使用和遇到的坑

安裝環境 alios7.2 安裝 1安裝源 yum install epel release y yum clean all yum list 2 安裝docker yum install docker io y systemctl start docker 3 檢查docker docker in...

vue中遇到的坑

1 乙個是eventhub的坑 重複監聽的問題 解決方案監聽之前先off掉 2 路由的坑 不加replace會兩個頁面來回跳,無法正常的返回父級頁面。3 vuejs對data中陣列的原生方法進行了封裝,所以在改變陣列時能夠觸發檢視更新,但是以下兩種情況是無法觸發檢視的更新的 1 通過索引直接修改陣列...

gson中遇到的坑

com.google.gson.jsonsyntaxexception com.google.gson.stream.malformedjsonexception expected name at line 1 column 3 path 0 我的json 問題翻譯 第一行 第三個 取值 有問題 找...