facebookresearch/AnimatedDrawings

I have no idea to deal with this problem, ubuntu 18.04 miniconda

Andy-Ren opened this issue · 2 comments

#0 21.73 from /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/dispatch/Dispatcher.h:4,
#0 21.73 from /opt/conda/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/types.h:12,
#0 21.73 from /tmp/pip-install-cf1psikn/mmcv-full_3fdf057e44b7448787b24698b8e60bdf/mmcv/ops/csrc/common/pytorch_cpp_helper.hpp:3,
#0 21.73 from ./mmcv/ops/csrc/pytorch/active_rotated_filter.cpp:5:
#0 21.73 /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h: In constructor ‘c10::impl::assert_is_valid_input_type<T, AllowDeprecatedTypes, Enable>::assert_is_valid_input_type()’:
#0 21.73 /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:109:10: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
#0 21.73 109 | if constexpr (guts::typelist::contains<supported_primitive_arg_types, T>::value) {
#0 21.73 | ^~~~~~~~~
#0 21.73 In file included from /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/boxing/KernelFunction_impl.h:2,
#0 21.73 from /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/boxing/KernelFunction.h:251,
#0 21.73 from /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/dispatch/Dispatcher.h:4,
#0 21.73 from /opt/conda/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/types.h:12,
#0 21.73 from /tmp/pip-install-cf1psikn/mmcv-full_3fdf057e44b7448787b24698b8e60bdf/mmcv/ops/csrc/common/pytorch_cpp_helper.hpp:3,
#0 21.73 from ./mmcv/ops/csrc/pytorch/active_rotated_filter.cpp:5:
#0 21.73 /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h: In constructor ‘c10::impl::assert_is_valid_output_type<T, AllowDeprecatedTypes, Enable>::assert_is_valid_output_type()’:
#0 21.73 /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:215:10: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
#0 21.73 215 | if constexpr(guts::typelist::contains<supported_primitive_arg_types, T>::value) {
#0 21.73 | ^~~~~~~~~
#0 21.73 /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h: In static member function ‘static void c10::impl::make_boxed_from_unboxed_functor<KernelFunctor, AllowDeprecatedTypes>::call(c10::OperatorKernel*, const c10::OperatorHandle&, c10::DispatchKeySet, c10::Stack*)’:
#0 21.73 /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:575:10: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
#0 21.73 575 | if constexpr (has_outputs) {
#0 21.73 | ^~~~~~~~~
#0 21.73 In file included from /opt/conda/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/types.h:12,
#0 21.73 from /tmp/pip-install-cf1psikn/mmcv-full_3fdf057e44b7448787b24698b8e60bdf/mmcv/ops/csrc/common/pytorch_cpp_helper.hpp:3,
#0 21.73 from ./mmcv/ops/csrc/pytorch/active_rotated_filter.cpp:5:
#0 21.73 /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/dispatch/Dispatcher.h: In static member function ‘static Return c10::Dispatcher::callWithDispatchKeySlowPath(const c10::TypedOperatorHandle<Return(Args ...)>&, at::StepCallbacks&, c10::DispatchKeySet, const c10::KernelFunction&, Args ...)’:
#0 21.73 /opt/conda/lib/python3.11/site-packages/torch/include/ATen/core/dispatch/Dispatcher.h:597:6: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
#0 21.73 597 | if constexpr (num_boxed_args != 0) {
#0 21.73 | ^~~~~~~~~
#0 21.73 error: command '/usr/bin/gcc' failed with exit code 1
#0 21.73 [end of output]
#0 21.73
#0 21.73 note: This error originates from a subprocess, and is likely not a problem with pip.
#0 21.73 ERROR: Failed building wheel for mmcv-full
#0 21.73 Running setup.py clean for mmcv-full
#0 23.75 Failed to build mmcv-full
#0 23.75 ERROR: Could not build wheels for mmcv-full, which is required to install pyproject.toml-based projects

Dockerfile:23

21 | RUN pip install openmim
22 | RUN pip install torch
23 | >>> RUN mim install mmcv-full==1.7.0
24 | RUN pip install mmdet==2.27.0
25 | RUN pip install torchserve

ERROR: failed to solve: process "/bin/sh -c mim install mmcv-full==1.7.0" did not complete successfully: exit code: 1

mogar commented

I think there's some incompatibility in the version of torch released last month. I got around this by making the following change:

diff --git a/torchserve/Dockerfile b/torchserve/Dockerfile
index ec7aa64..5ee973d 100644
--- a/torchserve/Dockerfile
+++ b/torchserve/Dockerfile
@@ -19,7 +19,7 @@ RUN apt-get update && \
 
 # install python dependencies
 RUN pip install openmim
-RUN pip install torch
+RUN pip install torch==2.0.1
 RUN mim install mmcv-full==1.7.0
 RUN pip install mmdet==2.27.0
 RUN pip install torchserve

thanks!
yesterday, I changed mmcv-full==v1.7.0 to mmcv-full==v1.3.17; it's ok now!