Bonjour à tous,
dernièrement, j'ai un problème lors de l'installation de detectron via docker. J'échoue maintenant avec :
/usr/local/caffe2_build/include/caffe2/core/tensor.h:687:17 : remarque : le candidat attend 1 argument, 0 fourni
/detectron/detectron/ops/zero_even_op.cc:33:27: erreur : 'class caffe2::Tensor<:cpucontext i="7">' n'a pas de membre nommé 'numel'
pour (auto je = 0; je < Y->numel(); je += 2) {
J'ai trouvé un problème connexe ici:
https://github.com/facebookresearch/Detectron/issues/732
mais je ne peux pas utiliser le correctif car detectron s'installe directement à partir du référentiel. Pourriez-vous s'il vous plaît changer le référentiel?
Merci d'avance,
Érik
Salut, j'ai le même problème avec le Dockerfile. Je me demande si cela pourrait être lié à la version CUDA.
La compilation est en panne maintenant. Obtenir ceci :
N'y a-t-il pas une version automatisée prise en charge de ceci n'importe où sur le hub de docker ?
Mon système a d'autres conteneurs utilisant CUDA qui fonctionnent bien.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- CUDA detected: 9.0
-- Added CUDA NVCC flags for: sm_30 sm_35 sm_50 sm_52 sm_60 sm_61 sm_70
-- Found libcuda: /usr/local/cuda/lib64/stubs/libcuda.so
-- Found libnvrtc: /usr/local/cuda/lib64/libnvrtc.so
-- Found CUDNN: /usr/include
-- Found cuDNN: v7.0.5 (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)
-- Summary:
-- CMake version : 3.5.1
-- CMake command : /usr/bin/cmake
-- System name : Linux
-- C++ compiler : /usr/bin/c++
-- C++ compiler version : 5.4.0
-- CXX flags : -std=c++11 -O2 -fPIC -Wno-narrowing
-- Caffe2 version : 0.8.1
-- Caffe2 include path : /usr/local/caffe2_build/include
-- Have CUDA : TRUE
-- CUDA version : 9.0
-- CuDNN version : 7.0.5
-- Configuring done
-- Generating done
-- 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
In file included from /usr/local/caffe2_build/include/caffe2/core/allocator.h:22:0,
from /usr/local/caffe2_build/include/caffe2/core/context.h:25,
from /detectron/detectron/ops/zero_even_op.h:20,
from /detectron/detectron/ops/zero_even_op.cc:17:
/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:25:23: error: no matching function for call to 'caffe2::Tensor<caffe2::CPUContext>::dim() const'
CAFFE_ENFORCE(X.dim() == 1);
^
In file included from /usr/local/caffe2_build/include/caffe2/core/net.h:34:0,
from /usr/local/caffe2_build/include/caffe2/core/operator.h:29,
from /detectron/detectron/ops/zero_even_op.h:21,
from /detectron/detectron/ops/zero_even_op.cc:17:
/usr/local/caffe2_build/include/caffe2/core/tensor.h:687:17: note: candidate: caffe2::TIndex caffe2::Tensor<Context>::dim(int) const [with Context = caffe2::CPUContext; caffe2::TIndex = long int]
inline TIndex dim(const int i) const {
^
/usr/local/caffe2_build/include/caffe2/core/tensor.h:687:17: note: candidate expects 1 argument, 0 provided
/detectron/detectron/ops/zero_even_op.cc:33:27: error: 'class caffe2::Tensor<caffe2::CPUContext>' has no member named 'numel'
for (auto i = 0; i < Y->numel(); i += 2) {
^
CMakeFiles/caffe2_detectron_custom_ops.dir/build.make:62: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/zero_even_op.cc.o' failed
make[3]: *** [CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/zero_even_op.cc.o] Error 1
make[3]: Leaving directory '/detectron/build'
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops.dir/all' failed
make[2]: *** [CMakeFiles/caffe2_detectron_custom_ops.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
Scanning dependencies of target caffe2_detectron_custom_ops_gpu
make[3]: Leaving directory '/detectron/build'
make[3]: Entering directory '/detectron/build'
[ 60%] Building CXX object CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/zero_even_op.cc.o
In file included from /usr/local/caffe2_build/include/caffe2/core/allocator.h:22:0,
from /usr/local/caffe2_build/include/caffe2/core/context.h:25,
from /detectron/detectron/ops/zero_even_op.h:20,
from /detectron/detectron/ops/zero_even_op.cc:17:
/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:25:23: error: no matching function for call to 'caffe2::Tensor<caffe2::CPUContext>::dim() const'
CAFFE_ENFORCE(X.dim() == 1);
^
In file included from /usr/local/caffe2_build/include/caffe2/core/net.h:34:0,
from /usr/local/caffe2_build/include/caffe2/core/operator.h:29,
from /detectron/detectron/ops/zero_even_op.h:21,
from /detectron/detectron/ops/zero_even_op.cc:17:
/usr/local/caffe2_build/include/caffe2/core/tensor.h:687:17: note: candidate: caffe2::TIndex caffe2::Tensor<Context>::dim(int) const [with Context = caffe2::CPUContext; caffe2::TIndex = long int]
inline TIndex dim(const int i) const {
^
/usr/local/caffe2_build/include/caffe2/core/tensor.h:687:17: note: candidate expects 1 argument, 0 provided
/detectron/detectron/ops/zero_even_op.cc:33:27: error: 'class caffe2::Tensor<caffe2::CPUContext>' has no member named 'numel'
for (auto i = 0; i < Y->numel(); i += 2) {
^
CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/build.make:69: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/zero_even_op.cc.o' failed
make[3]: *** [CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/zero_even_op.cc.o] Error 1
make[3]: Leaving directory '/detectron/build'
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/all' failed
make[2]: Leaving directory '/detectron/build'
make[2]: *** [CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make[1]: Leaving directory '/detectron/build'
make[1]: *** [all] Error 2
Makefile:13: recipe for target 'ops' failed
make: *** [ops] Error 2
The command '/bin/sh -c make ops' returned a non-zero code: 2
Je l'ai fait fonctionner en payant d56e267efc92b65b8d899f1b89a7ed2bca3e5f44 au lieu du dernier maître
@TheNeikos , je le fais aussi fonctionner avec d56e267efc92b65b8d899f1b89a7ed2bca3e5f44
Je l'ai fait fonctionner en payant d56e267 au lieu du dernier maître
tu veux dire dans le Dockerfile ? par exemple
RUN git clone https://github.com/facebookresearch/detectron/detectron
RUN cd / detectron && git checkout d56e267
@beatthat oui exactement
Merci @TheNeikos ! Zuckerberg devrait vous donner au moins 10 mille euros, car sans votre commentaire j'aurais abandonné Detectron et utilisé uniquement l'implémentation de Matterport :D
@manyaafonso
Pourriez-vous partager plus de détails sur la façon dont vous résolvez ce problème, s'il vous plaît ?
Je suis la suggestion de @TheNeikos @beatthat @francois-wellenreiter
1.RUN git clone https://github.com/facebookresearch/detectron/detectron
Et toujours la même sortie d'erreur.
Je pense que git checkout d56e267 m'aide à passer à l'ancienne version. Et en d56e267
"/detectron/ops/zero_even_op.cc" ce fichier a
for (auto i = 0; i < Y->size(); i += 2) {
Mais lorsque j'essaie de construire, le message d'erreur s'affiche toujours
for (auto i = 0; i < Y->numel(); i += 2) {
^
Je ne sais pas s'il y a quelque chose que j'ai oublié de faire.
Bonjour @randf102 ,
en fait j'ai appliqué cette modification sur le Dockerfile et le build a réussi :
``` diff
diff --git a/docker/Dockerfile b/docker/Dockerfile
indice 38cc0ea..c02a110 100644
--- un/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -10,6 +10,9 @@ ENV LD_LIBRARY_PATH /usr/local/caffe2_build/lib:${LD_LIBRARY_PATH}
# Cloner le référentiel Detectron
RUN git clone https://github.com/facebookresearch/detectron/detectron
+WORKDIR /détectron
+RUN git checkout d56e267efc92b65b8d899f1b89a7ed2bca3e5f44
+
# Installer les dépendances Python
RUN pip install -r /detectron/requirements.txt
```
Salut @ randf102 , j'ai simplement modifié le dockerfile en changeant la partie suivante selon les commentaires ci-dessus :
RUN git clone https://github.com/facebookresearch/detectron/detectron
RUN cd / detectron && git checkout d56e267
Et puis à l'invite Linux :
nvidia-docker build -t my_detectron_image .
@francois-wellenreiter @manyaafonso
Merci de m'aider.
Je devrais modifier le Dockerfile, pas exécuter "git checkout d56e267" directement dans le terminal.
Je l'ai compris et finalement réussi à le construire.
Merci!
@TheNeikos , merci pour votre réponse
J'ai pu compiler le Dockerfile avec le dernier commit (7aa91aa) annulant essentiellement deux modifications de renommage de fonction, à partir des commits c00e35a et 8181a32. Faites cela en ajoutant deux instructions sed après les "lignes d'installation de l'API COCO":
# Install the COCO API
RUN git clone https://github.com/cocodataset/cocoapi.git /cocoapi
WORKDIR /cocoapi/PythonAPI
RUN make install
# Patch
RUN sed -i 's/numel/size/g' /detectron/detectron/ops/zero_even_op.cc && \
sed -i 's/X.dim/X.ndim/g' /detectron/detectron/ops/zero_even_op.cc
Commentaire le plus utile
tu veux dire dans le Dockerfile ? par exemple
RUN git clone https://github.com/facebookresearch/detectron/detectron
RUN cd / detectron && git checkout d56e267