IDEA-Research / detrex

detrex is a research platform for DETR-based object detection, segmentation, pose estimation and other visual recognition tasks.
https://detrex.readthedocs.io/en/latest/
Apache License 2.0
2k stars 206 forks source link

[Solved] help with detrex build needed #290

Open DanielWit opened 1 year ago

DanielWit commented 1 year ago

Hi, I am trying to run detrex (DINO in particular). When I run this command python -m pip install -e detectron2 on a freshly set up environment I get this output. Could someone help to analyse this? I've tried to solve this for many hours but without satisfying results. Thank you

The system I use is Debian 11. Torch installed by 'conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch'

 (detrex) root@609f642bf05f:/home/Projects/detrex# python -m pip install -e detectron2
Obtaining file:///home/Projects/detrex/detectron2
  Preparing metadata (setup.py) ... done
Requirement already satisfied: Pillow>=7.1 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (9.4.0)
Requirement already satisfied: matplotlib in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (3.5.3)
Requirement already satisfied: pycocotools>=2.0.2 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (2.0.6)
Requirement already satisfied: termcolor>=1.1 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (2.3.0)
Requirement already satisfied: yacs>=0.1.8 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (0.1.8)
Requirement already satisfied: tabulate in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (0.9.0)
Requirement already satisfied: cloudpickle in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (2.2.1)
Requirement already satisfied: tqdm>4.29.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (4.65.0)
Requirement already satisfied: tensorboard in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (2.11.2)
Requirement already satisfied: fvcore<0.1.6,>=0.1.5 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (0.1.5.post20221221)
Requirement already satisfied: iopath<0.1.10,>=0.1.7 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (0.1.9)
Requirement already satisfied: future in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (0.18.3)
Requirement already satisfied: pydot in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (1.4.2)
Requirement already satisfied: omegaconf>=2.1 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (2.3.0)
Requirement already satisfied: hydra-core>=1.1 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (1.3.2)
Requirement already satisfied: black==22.3.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (22.3.0)
Requirement already satisfied: timm in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (0.9.2)
Requirement already satisfied: fairscale in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (0.4.6)
Requirement already satisfied: packaging in /opt/conda/envs/detrex/lib/python3.7/site-packages (from detectron2==0.6) (23.1)
Requirement already satisfied: platformdirs>=2 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from black==22.3.0->detectron2==0.6) (3.10.0)
Requirement already satisfied: mypy-extensions>=0.4.3 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from black==22.3.0->detectron2==0.6) (1.0.0)
Requirement already satisfied: pathspec>=0.9.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from black==22.3.0->detectron2==0.6) (0.11.2)
Requirement already satisfied: typing-extensions>=3.10.0.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from black==22.3.0->detectron2==0.6) (4.7.1)
Requirement already satisfied: tomli>=1.1.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from black==22.3.0->detectron2==0.6) (2.0.1)
Requirement already satisfied: click>=8.0.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from black==22.3.0->detectron2==0.6) (8.1.6)
Requirement already satisfied: typed-ast>=1.4.2 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from black==22.3.0->detectron2==0.6) (1.5.5)
Requirement already satisfied: numpy in /opt/conda/envs/detrex/lib/python3.7/site-packages (from fvcore<0.1.6,>=0.1.5->detectron2==0.6) (1.21.5)
Requirement already satisfied: pyyaml>=5.1 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from fvcore<0.1.6,>=0.1.5->detectron2==0.6) (6.0.1)
Requirement already satisfied: importlib-resources in /opt/conda/envs/detrex/lib/python3.7/site-packages (from hydra-core>=1.1->detectron2==0.6) (5.12.0)
Requirement already satisfied: antlr4-python3-runtime==4.9.* in /opt/conda/envs/detrex/lib/python3.7/site-packages (from hydra-core>=1.1->detectron2==0.6) (4.9.3)
Requirement already satisfied: portalocker in /opt/conda/envs/detrex/lib/python3.7/site-packages (from iopath<0.1.10,>=0.1.7->detectron2==0.6) (2.7.0)
Requirement already satisfied: cycler>=0.10 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from matplotlib->detectron2==0.6) (0.11.0)
Requirement already satisfied: python-dateutil>=2.7 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from matplotlib->detectron2==0.6) (2.8.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from matplotlib->detectron2==0.6) (1.4.4)
Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from matplotlib->detectron2==0.6) (4.38.0)
Requirement already satisfied: pyparsing>=2.2.1 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from matplotlib->detectron2==0.6) (3.1.1)
Requirement already satisfied: torch>=1.8.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from fairscale->detectron2==0.6) (1.11.0)
Requirement already satisfied: google-auth<3,>=1.6.3 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (2.22.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (0.4.6)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (0.6.1)
Requirement already satisfied: setuptools>=41.0.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (65.6.3)
Requirement already satisfied: werkzeug>=1.0.1 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (2.2.3)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (1.8.1)
Requirement already satisfied: absl-py>=0.4 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (1.4.0)
Requirement already satisfied: requests<3,>=2.21.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (2.28.1)
Requirement already satisfied: wheel>=0.26 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (0.38.4)
Requirement already satisfied: grpcio>=1.24.3 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (1.56.2)
Requirement already satisfied: markdown>=2.6.8 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (3.4.4)
Requirement already satisfied: protobuf<4,>=3.9.2 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from tensorboard->detectron2==0.6) (3.20.3)
Requirement already satisfied: huggingface-hub in /opt/conda/envs/detrex/lib/python3.7/site-packages (from timm->detectron2==0.6) (0.16.4)
Requirement already satisfied: torchvision in /opt/conda/envs/detrex/lib/python3.7/site-packages (from timm->detectron2==0.6) (0.12.0)
Requirement already satisfied: safetensors in /opt/conda/envs/detrex/lib/python3.7/site-packages (from timm->detectron2==0.6) (0.3.1)
Requirement already satisfied: importlib-metadata in /opt/conda/envs/detrex/lib/python3.7/site-packages (from click>=8.0.0->black==22.3.0->detectron2==0.6) (6.7.0)
Requirement already satisfied: rsa<5,>=3.1.4 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2==0.6) (4.9)
Requirement already satisfied: six>=1.9.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2==0.6) (1.16.0)
Requirement already satisfied: urllib3<2.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2==0.6) (1.26.14)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2==0.6) (0.3.0)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2==0.6) (5.3.1)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard->detectron2==0.6) (1.3.1)
Requirement already satisfied: charset-normalizer<3,>=2 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard->detectron2==0.6) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard->detectron2==0.6) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard->detectron2==0.6) (2022.12.7)
Requirement already satisfied: MarkupSafe>=2.1.1 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from werkzeug>=1.0.1->tensorboard->detectron2==0.6) (2.1.3)
Requirement already satisfied: filelock in /opt/conda/envs/detrex/lib/python3.7/site-packages (from huggingface-hub->timm->detectron2==0.6) (3.12.2)
Requirement already satisfied: fsspec in /opt/conda/envs/detrex/lib/python3.7/site-packages (from huggingface-hub->timm->detectron2==0.6) (2023.1.0)
Requirement already satisfied: zipp>=3.1.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from importlib-resources->hydra-core>=1.1->detectron2==0.6) (3.15.0)
Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard->detectron2==0.6) (0.5.0)
Requirement already satisfied: oauthlib>=3.0.0 in /opt/conda/envs/detrex/lib/python3.7/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard->detectron2==0.6) (3.2.2)
Installing collected packages: detectron2
  Running setup.py develop for detectron2
    error: subprocess-exited-with-error

    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [159 lines of output]
        running develop
        running egg_info
        writing detectron2.egg-info/PKG-INFO
        writing dependency_links to detectron2.egg-info/dependency_links.txt
        writing requirements to detectron2.egg-info/requires.txt
        writing top-level names to detectron2.egg-info/top_level.txt
        reading manifest file 'detectron2.egg-info/SOURCES.txt'
        adding license file 'LICENSE'
        writing manifest file 'detectron2.egg-info/SOURCES.txt'
        running build_ext
        building 'detectron2._C' extension
        Emitting ninja build file /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/build.ninja...
        Compiling objects...
        Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
        /opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
          EasyInstallDeprecationWarning,
        /opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
          setuptools.SetuptoolsDeprecationWarning,
        [1/1] c++ -MMD -MF /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.o.d -pthread -B /opt/conda/envs/detrex/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/Projects/detrex/detectron2/detectron2/layers/csrc -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/TH -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/THC -I/opt/conda/envs/detrex/include/python3.7m -c -c /home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp -o /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
        FAILED: /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.o
        c++ -MMD -MF /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.o.d -pthread -B /opt/conda/envs/detrex/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/Projects/detrex/detectron2/detectron2/layers/csrc -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/TH -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/THC -I/opt/conda/envs/detrex/include/python3.7m -c -c /home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp -o /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
        cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
        In file included from /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:45,
                         from /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/numpy.h:12,
                         from /home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.h:4,
                         from /home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp:2:
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:199:10: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
          199 |     std::uint16_t nargs;
              |          ^~~~~~~~
              |          wint_t
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:202:10: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
          202 |     std::uint16_t nargs_kw_only = 0;
              |          ^~~~~~~~
              |          wint_t
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:205:10: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
          205 |     std::uint16_t nargs_pos_only = 0;
              |          ^~~~~~~~
              |          wint_t
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h: In constructor ‘pybind11::detail::function_call::function_call(const pybind11::detail::function_record&, pybind11::handle)’:
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:310:20: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs’; did you mean ‘args’?
          310 |     args.reserve(f.nargs);
              |                    ^~~~~
              |                    args
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:311:28: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs’; did you mean ‘args’?
          311 |     args_convert.reserve(f.nargs);
              |                            ^~~~~
              |                            args
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h: In function ‘void pybind11::detail::process_kw_only_arg(const pybind11::arg&, function_record*)’:
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:382:10: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_kw_only’
          382 |     ++r->nargs_kw_only;
              |          ^~~~~~~~~~~~~
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h: In static member function ‘static void pybind11::detail::process_attribute<pybind11::pos_only>::init(const pybind11::pos_only&, pybind11::detail::function_record*)’:
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:439:12: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
          439 |         r->nargs_pos_only = static_cast<std::uint16_t>(r->args.size());
              |            ^~~~~~~~~~~~~~
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:439:46: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
          439 |         r->nargs_pos_only = static_cast<std::uint16_t>(r->args.size());
              |                                              ^~~~~~~~
              |                                              wint_t
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h: In member function ‘void pybind11::cpp_function::initialize_generic(unique_function_record&&, const char*, const std::type_info* const*, pybind11::size_t)’:
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:311:26: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_kw_only’
          311 |                 if (rec->nargs_kw_only > 0 && arg_index + rec->nargs_kw_only == args)
              |                          ^~~~~~~~~~~~~
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:311:64: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_kw_only’
          311 |                 if (rec->nargs_kw_only > 0 && arg_index + rec->nargs_kw_only == args)
              |                                                                ^~~~~~~~~~~~~
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:329:26: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
          329 |                 if (rec->nargs_pos_only > 0 && (arg_index + 1) == rec->nargs_pos_only)
              |                          ^~~~~~~~~~~~~~
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:329:72: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
          329 |                 if (rec->nargs_pos_only > 0 && (arg_index + 1) == rec->nargs_pos_only)
              |                                                                        ^~~~~~~~~~~~~~
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:371:14: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs’; did you mean ‘args’?
          371 |         rec->nargs = (std::uint16_t) args;
              |              ^~~~~
              |              args
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:371:28: error: ‘uint16_t’ is not a member of ‘std’; did you mean ‘wint_t’?
          371 |         rec->nargs = (std::uint16_t) args;
              |                            ^~~~~~~~
              |                            wint_t
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h: In static member function ‘static PyObject* pybind11::cpp_function::dispatcher(PyObject*, PyObject*, PyObject*)’:
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:604:40: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs’; did you mean ‘args’?
          604 |                 size_t num_args = func.nargs;    // Number of positional arguments that we need
              |                                        ^~~~~
              |                                        args
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:607:51: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs_kw_only’
          607 |                 size_t pos_args = num_args - func.nargs_kw_only;
              |                                                   ^~~~~~~~~~~~~
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:657:40: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
          657 |                 if (args_copied < func.nargs_pos_only) {
              |                                        ^~~~~~~~~~~~~~
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:658:47: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
          658 |                     for (; args_copied < func.nargs_pos_only; ++args_copied) {
              |                                               ^~~~~~~~~~~~~~
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:672:44: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
          672 |                     if (args_copied < func.nargs_pos_only)
              |                                            ^~~~~~~~~~~~~~
        /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:760:53: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs’; did you mean ‘args’?
          760 |                     second_pass_convert.resize(func.nargs, false);
              |                                                     ^~~~~
              |                                                     args
        ninja: build stopped: subcommand failed.
        Traceback (most recent call last):
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1746, in _run_ninja_build
            env=env)
          File "/opt/conda/envs/detrex/lib/python3.7/subprocess.py", line 512, in run
            output=stdout, stderr=stderr)
        subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

        The above exception was the direct cause of the following exception:

        Traceback (most recent call last):
          File "<string>", line 36, in <module>
          File "<pip-setuptools-caller>", line 34, in <module>
          File "/home/Projects/detrex/detectron2/setup.py", line 211, in <module>
            cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension},
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/__init__.py", line 87, in setup
            return distutils.core.setup(**attrs)
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
            return run_commands(dist)
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
            dist.run_commands()
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
            self.run_command(cmd)
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
            super().run_command(command)
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
            cmd_obj.run()
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/develop.py", line 34, in run
            self.install_for_development()
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/develop.py", line 114, in install_for_development
            self.run_command('build_ext')
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
            self.distribution.run_command(command)
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
            super().run_command(command)
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
            cmd_obj.run()
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 84, in run
            _build_ext.run(self)
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
            self.build_extensions()
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 741, in build_extensions
            build_ext.build_extensions(self)
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 468, in build_extensions
            self._build_extensions_serial()
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 494, in _build_extensions_serial
            self.build_extension(ext)
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
            _build_ext.build_extension(self, ext)
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 556, in build_extension
            depends=ext.depends,
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 571, in unix_wrap_ninja_compile
            with_cuda=with_cuda)
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1424, in _write_ninja_file_and_compile_objects
            error_prefix='Error compiling objects for extension')
          File "/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1756, in _run_ninja_build
            raise RuntimeError(message) from e
        RuntimeError: Error compiling objects for extension
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [159 lines of output]
    running develop
    running egg_info
    writing detectron2.egg-info/PKG-INFO
    writing dependency_links to detectron2.egg-info/dependency_links.txt
    writing requirements to detectron2.egg-info/requires.txt
    writing top-level names to detectron2.egg-info/top_level.txt
    reading manifest file 'detectron2.egg-info/SOURCES.txt'
    adding license file 'LICENSE'
    writing manifest file 'detectron2.egg-info/SOURCES.txt'
    running build_ext
    building 'detectron2._C' extension
    Emitting ninja build file /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/build.ninja...
    Compiling objects...
    Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
    /opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      EasyInstallDeprecationWarning,
    /opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      setuptools.SetuptoolsDeprecationWarning,
    [1/1] c++ -MMD -MF /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.o.d -pthread -B /opt/conda/envs/detrex/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/Projects/detrex/detectron2/detectron2/layers/csrc -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/TH -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/THC -I/opt/conda/envs/detrex/include/python3.7m -c -c /home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp -o /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    FAILED: /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.o
    c++ -MMD -MF /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.o.d -pthread -B /opt/conda/envs/detrex/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/Projects/detrex/detectron2/detectron2/layers/csrc -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/TH -I/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/THC -I/opt/conda/envs/detrex/include/python3.7m -c -c /home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp -o /home/Projects/detrex/detectron2/build/temp.linux-x86_64-cpython-37/home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:45,
                     from /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/numpy.h:12,
                     from /home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.h:4,
                     from /home/Projects/detrex/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp:2:
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:199:10: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
      199 |     std::uint16_t nargs;
          |          ^~~~~~~~
          |          wint_t
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:202:10: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
      202 |     std::uint16_t nargs_kw_only = 0;
          |          ^~~~~~~~
          |          wint_t
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:205:10: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
      205 |     std::uint16_t nargs_pos_only = 0;
          |          ^~~~~~~~
          |          wint_t
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h: In constructor ‘pybind11::detail::function_call::function_call(const pybind11::detail::function_record&, pybind11::handle)’:
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:310:20: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs’; did you mean ‘args’?
      310 |     args.reserve(f.nargs);
          |                    ^~~~~
          |                    args
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:311:28: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs’; did you mean ‘args’?
      311 |     args_convert.reserve(f.nargs);
          |                            ^~~~~
          |                            args
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h: In function ‘void pybind11::detail::process_kw_only_arg(const pybind11::arg&, function_record*)’:
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:382:10: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_kw_only’
      382 |     ++r->nargs_kw_only;
          |          ^~~~~~~~~~~~~
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h: In static member function ‘static void pybind11::detail::process_attribute<pybind11::pos_only>::init(const pybind11::pos_only&, pybind11::detail::function_record*)’:
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:439:12: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
      439 |         r->nargs_pos_only = static_cast<std::uint16_t>(r->args.size());
          |            ^~~~~~~~~~~~~~
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/attr.h:439:46: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
      439 |         r->nargs_pos_only = static_cast<std::uint16_t>(r->args.size());
          |                                              ^~~~~~~~
          |                                              wint_t
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h: In member function ‘void pybind11::cpp_function::initialize_generic(unique_function_record&&, const char*, const std::type_info* const*, pybind11::size_t)’:
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:311:26: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_kw_only’
      311 |                 if (rec->nargs_kw_only > 0 && arg_index + rec->nargs_kw_only == args)
          |                          ^~~~~~~~~~~~~
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:311:64: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_kw_only’
      311 |                 if (rec->nargs_kw_only > 0 && arg_index + rec->nargs_kw_only == args)
          |                                                                ^~~~~~~~~~~~~
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:329:26: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
      329 |                 if (rec->nargs_pos_only > 0 && (arg_index + 1) == rec->nargs_pos_only)
          |                          ^~~~~~~~~~~~~~
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:329:72: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
      329 |                 if (rec->nargs_pos_only > 0 && (arg_index + 1) == rec->nargs_pos_only)
          |                                                                        ^~~~~~~~~~~~~~
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:371:14: error: ‘struct pybind11::detail::function_record’ has no member named ‘nargs’; did you mean ‘args’?
      371 |         rec->nargs = (std::uint16_t) args;
          |              ^~~~~
          |              args
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:371:28: error: ‘uint16_t’ is not a member of ‘std’; did you mean ‘wint_t’?
      371 |         rec->nargs = (std::uint16_t) args;
          |                            ^~~~~~~~
          |                            wint_t
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h: In static member function ‘static PyObject* pybind11::cpp_function::dispatcher(PyObject*, PyObject*, PyObject*)’:
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:604:40: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs’; did you mean ‘args’?
      604 |                 size_t num_args = func.nargs;    // Number of positional arguments that we need
          |                                        ^~~~~
          |                                        args
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:607:51: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs_kw_only’
      607 |                 size_t pos_args = num_args - func.nargs_kw_only;
          |                                                   ^~~~~~~~~~~~~
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:657:40: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
      657 |                 if (args_copied < func.nargs_pos_only) {
          |                                        ^~~~~~~~~~~~~~
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:658:47: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
      658 |                     for (; args_copied < func.nargs_pos_only; ++args_copied) {
          |                                               ^~~~~~~~~~~~~~
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:672:44: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs_pos_only’
      672 |                     if (args_copied < func.nargs_pos_only)
          |                                            ^~~~~~~~~~~~~~
    /opt/conda/envs/detrex/lib/python3.7/site-packages/torch/include/pybind11/pybind11.h:760:53: error: ‘const struct pybind11::detail::function_record’ has no member named ‘nargs’; did you mean ‘args’?
      760 |                     second_pass_convert.resize(func.nargs, false);
          |                                                     ^~~~~
          |                                                     args
    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1746, in _run_ninja_build
        env=env)
      File "/opt/conda/envs/detrex/lib/python3.7/subprocess.py", line 512, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 36, in <module>
      File "<pip-setuptools-caller>", line 34, in <module>
      File "/home/Projects/detrex/detectron2/setup.py", line 211, in <module>
        cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension},
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/__init__.py", line 87, in setup
        return distutils.core.setup(**attrs)
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
        return run_commands(dist)
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
        dist.run_commands()
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
        self.run_command(cmd)
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
        super().run_command(command)
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
        cmd_obj.run()
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/develop.py", line 34, in run
        self.install_for_development()
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/develop.py", line 114, in install_for_development
        self.run_command('build_ext')
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
        self.distribution.run_command(command)
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
        super().run_command(command)
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
        cmd_obj.run()
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 84, in run
        _build_ext.run(self)
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
        self.build_extensions()
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 741, in build_extensions
        build_ext.build_extensions(self)
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 468, in build_extensions
        self._build_extensions_serial()
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 494, in _build_extensions_serial
        self.build_extension(ext)
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
        _build_ext.build_extension(self, ext)
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 556, in build_extension
        depends=ext.depends,
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 571, in unix_wrap_ninja_compile
        with_cuda=with_cuda)
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1424, in _write_ninja_file_and_compile_objects
        error_prefix='Error compiling objects for extension')
      File "/opt/conda/envs/detrex/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1756, in _run_ninja_build
        raise RuntimeError(message) from e
    RuntimeError: Error compiling objects for extension
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
rentainhe commented 1 year ago

Hello, I was wondering what's your GCC version.

I can not actually tell what's the detailed error in your env, if your GCC version is too high (like 10.0+), it may not work with detectron2 I guess.

DanielWit commented 1 year ago

oh ok, that's most likely the issue, my gcc version is 13.1. Thank you for quick response. I will try to solve this somehow

rentainhe commented 1 year ago

oh ok, that's most likely the issue, my gcc version is 13.1. Thank you for quick response. I will try to solve this somehow

You can try GCC 9.4 or lower I guess.

DanielWit commented 1 year ago

oh ok, that's most likely the issue, my gcc version is 13.1. Thank you for quick response. I will try to solve this somehow

You can try GCC 9.4 or lower I guess.

That's what I am trying to do, although ton of issues given that I am just starting with Linux and stuff. Apparently, you can not just downgrade these files as nearly the whole system depends on them. But thanks for your help! I wish there was a docker file available for this awesome repo!

rentainhe commented 1 year ago

Thanks a lot for reporting this situation, we will try to update a Docker file for detrex for better usage

DanielWit commented 1 year ago

managed to run DINO. After all, I decided to install Ubuntu 18.04 instead of Debian 11. Given that Ubuntu is older distribution all gcc and g++ were maxed out at 9.3 therefore compatible with the Deformable Attention implementation. Together with Nvidia toolkit 11.6 and the appropriate torch version everything went without a single issue.

edit: sudo apt install g++-9 gcc-9 for RTX 3090: https://developer.nvidia.com/cuda-11-6-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_local pip install torch==1.13.0+cu116 torchvision==0.14.0+cu116 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu116

rentainhe commented 1 year ago

managed to run DINO. After all, I decided to install Ubuntu 18.04 instead of Debian 11. Given that Ubuntu is older distribution all gcc and g++ were maxed out at 9.3 therefore compatible with the Deformable Attention implementation. Together with Nvidia toolkit 11.6 and the appropriate torch version everything went without a single issue.

edit: sudo apt install g++-9 gcc-9 for RTX 3090: https://developer.nvidia.com/cuda-11-6-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_local pip install torch==1.13.0+cu116 torchvision==0.14.0+cu116 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu116

Thanks for your nice advice, we will add it to docs to help others who have met the same issue.

k-styles commented 8 months ago

This issue still persists for newer GCC versions, please try to solve them asap.

hzy-del commented 1 week ago

使用sudo试试