Error building docker image
See original GitHub issueFrom now on, we recommend using our discussion forum (https://github.com/rusty1s/pytorch_geometric/discussions) for general questions.
❓ Questions & Help
I am using the Dockerfile within this repo. However, when I try to build the image myself. I encountered the ‘gcc error’.
The full error log would be:
ERROR: Command errored out with exit status 1:
command: /home/user/miniconda/envs/py36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-0dqbqa0s
cwd: /tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/
Complete output (58 lines):
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/torch_scatter
copying torch_scatter/segment_csr.py -> build/lib.linux-x86_64-3.6/torch_scatter
copying torch_scatter/scatter.py -> build/lib.linux-x86_64-3.6/torch_scatter
copying torch_scatter/segment_coo.py -> build/lib.linux-x86_64-3.6/torch_scatter
copying torch_scatter/utils.py -> build/lib.linux-x86_64-3.6/torch_scatter
copying torch_scatter/__init__.py -> build/lib.linux-x86_64-3.6/torch_scatter
copying torch_scatter/placeholder.py -> build/lib.linux-x86_64-3.6/torch_scatter
creating build/lib.linux-x86_64-3.6/torch_scatter/composite
copying torch_scatter/composite/logsumexp.py -> build/lib.linux-x86_64-3.6/torch_scatter/composite
copying torch_scatter/composite/std.py -> build/lib.linux-x86_64-3.6/torch_scatter/composite
copying torch_scatter/composite/__init__.py -> build/lib.linux-x86_64-3.6/torch_scatter/composite
copying torch_scatter/composite/softmax.py -> build/lib.linux-x86_64-3.6/torch_scatter/composite
running build_ext
building 'torch_scatter._version_cpu' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/tmp
creating build/temp.linux-x86_64-3.6/tmp/pip-install-fssw7td4
creating build/temp.linux-x86_64-3.6/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85
creating build/temp.linux-x86_64-3.6/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc
gcc -pthread -B /home/user/miniconda/envs/py36/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc -I/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include -I/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/TH -I/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/THC -I/home/user/miniconda/envs/py36/include/python3.6m -c /tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc/version.cpp -o build/temp.linux-x86_64-3.6/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc/version.o -O2 -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_version_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from /home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/boxing/KernelFunction.h:5:0,
from /home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/dispatch/DispatchTable.h:10,
from /home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/dispatch/OperatorEntry.h:3,
from /home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/dispatch/Dispatcher.h:3,
from /home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/TensorMethods.h:10,
from /home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:12,
from /home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/Context.h:4,
from /home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/ATen.h:5,
from /home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/torch/script.h:3,
from /tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc/version.cpp:2:
/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/boxing/kernel_functor.h: In instantiation of 'typename c10::guts::infer_function_traits<Functor>::type::return_type c10::detail::call_functor_with_args_from_stack_(Functor*, c10::Stack*, c10::guts::index_sequence<INDEX ...>) [with Functor = c10::detail::WrapRuntimeKernelFunctor_<long int (*)(), long int, c10::guts::typelist::typelist<> >; bool AllowDeprecatedTypes = true; long unsigned int ...ivalue_arg_indices = {}; typename c10::guts::infer_function_traits<Functor>::type::return_type = long int; c10::Stack = std::vector<c10::IValue, std::allocator<c10::IValue> >; c10::guts::index_sequence<INDEX ...> = c10::guts::integer_sequence<long unsigned int>]':
/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/boxing/kernel_functor.h:202:77: required from 'typename c10::guts::infer_function_traits<Functor>::type::return_type c10::detail::call_functor_with_args_from_stack(Functor*, c10::Stack*) [with Functor = c10::detail::WrapRuntimeKernelFunctor_<long int (*)(), long int, c10::guts::typelist::typelist<> >; bool AllowDeprecatedTypes = true; typename c10::guts::infer_function_traits<Functor>::type::return_type = long int; c10::Stack = std::vector<c10::IValue, std::allocator<c10::IValue> >]'
/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/boxing/kernel_functor.h:234:91: required from 'static void c10::detail::wrap_kernel_functor_boxed<KernelFunctor, AllowDeprecatedTypes, typename std::enable_if<(! std::is_same<void, typename c10::guts::infer_function_traits<Functor>::type::return_type>::value), void>::type>::call(c10::OperatorKernel*, c10::Stack*) [with KernelFunctor = c10::detail::WrapRuntimeKernelFunctor_<long int (*)(), long int, c10::guts::typelist::typelist<> >; bool AllowDeprecatedTypes = true; c10::Stack = std::vector<c10::IValue, std::allocator<c10::IValue> >]'
/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/boxing/KernelFunction.h:172:7: required from 'static c10::KernelFunction c10::KernelFunction::makeFromUnboxedFunctor(std::unique_ptr<c10::OperatorKernel>) [with bool AllowLegacyTypes = true; KernelFunctor = c10::detail::WrapRuntimeKernelFunctor_<long int (*)(), long int, c10::guts::typelist::typelist<> >]'
/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/boxing/KernelFunction.h:313:111: required from 'static c10::KernelFunction c10::KernelFunction::makeFromUnboxedRuntimeFunction(FuncType*) [with bool AllowLegacyTypes = true; FuncType = long int()]'
/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/op_registration/op_registration.h:517:72: required from 'c10::guts::enable_if_t<(c10::guts::is_function_type<T>::value && (! std::is_same<FuncType, void(c10::OperatorKernel*, std::vector<c10::IValue, std::allocator<c10::IValue> >*)>::value)), c10::RegisterOperators&&> c10::RegisterOperators::op(const string&, FuncType*, c10::RegisterOperators::Options&&) && [with FuncType = long int(); c10::guts::enable_if_t<(c10::guts::is_function_type<T>::value && (! std::is_same<FuncType, void(c10::OperatorKernel*, std::vector<c10::IValue, std::allocator<c10::IValue> >*)>::value)), c10::RegisterOperators&&> = c10::RegisterOperators&&; std::string = std::basic_string<char>]'
/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc/version.cpp:25:79: required from here
/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/ATen/core/boxing/kernel_functor.h:191:22: warning: variable 'num_ivalue_args' set but not used [-Wunused-but-set-variable]
constexpr size_t num_ivalue_args = sizeof...(ivalue_arg_indices);
^~~~~~~~~~~~~~~
g++ -pthread -shared -B /home/user/miniconda/envs/py36/compiler_compat -L/home/user/miniconda/envs/py36/lib -Wl,-rpath=/home/user/miniconda/envs/py36/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc/version.o -o build/lib.linux-x86_64-3.6/torch_scatter/_version_cpu.so -s
building 'torch_scatter._segment_coo_cpu' extension
creating build/temp.linux-x86_64-3.6/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc/cpu
gcc -pthread -B /home/user/miniconda/envs/py36/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc -I/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include -I/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/TH -I/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/include/THC -I/home/user/miniconda/envs/py36/include/python3.6m -c /tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc/segment_coo.cpp -o build/temp.linux-x86_64-3.6/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc/segment_coo.o -O2 -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_segment_coo_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc/segment_coo.cpp: In static member function 'static torch::autograd::variable_list SegmentMeanCOO::backward(torch::autograd::AutogradContext*, torch::autograd::variable_list)':
/tmp/pip-install-fssw7td4/torch-scatter_0d58cd9527cc4f64bcb7fe55c6dd4e85/csrc/segment_coo.cpp:104:13: error: 'class at::Tensor' has no member named 'true_divide_'
grad_in.true_divide_(count);
^~~~~~~~~~~~
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for torch-scatter
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
docker - Error on building Dockerfile to Image
The error means it can't find the directory which mean it probably doesn't exist or you are doing it the wrong way.
Read more >Unable to build my docker image
I have a created a project as well as dockerfiles inside it. I'm trying to run it from docker but I keep getting...
Read more >Docker: “build” Requires 1 Argument Error
The most common reason for “Docker build Requires 1 Argument” error is when we try to build the image without providing sufficient arguments....
Read more >Error building docker image for different platform/arch on ...
It seems that this error occurs only when having scratch image as a base and ARG as a second command. After swapping ARG...
Read more >Use kaniko to build Docker images - GitLab Docs
kaniko is a tool to build container images from a Dockerfile, inside a container or Kubernetes cluster. kaniko solves two problems with using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This works for me. Hope it will help someone who needs an image of this.
Worked for me as well. Thanks fo sharing!