I can't install the OBBDetection with A100 GPU
kangpeilun opened this issue · 1 comments
When I follow your install proceeding as you write, I can't run this repo, because the cuda(10.2) does't support A100. So I upgrade the version of pytorch(1.9.0) and cuda(11.3), but at this time, I even can't compile successfully with the error "RuntimeError: Error compiling objects for extension", my cuda compile driver's version is 11.3, I'm so confused. It takes me 2 days to install OBBDetection with A100 GPU, and finally I got the conclusion, OBBDetection is not fit A100 GPU well.
Maybe I'm wrong, Could u give me some help? Can OBBDetection really not run on A100?
My environment:
# packages in environment at /home/plkang/software/Anaconda/Anaconda3/envs/mmcv:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
addict 2.4.0 pypi_0 pypi
bboxtoolkit 1.1 dev_0 <develop>
blas 1.0 mkl
bzip2 1.0.8 h7f98852_4 conda-forge
ca-certificates 2023.5.7 hbcca054_0 conda-forge
certifi 2023.5.7 pyhd8ed1ab_0 conda-forge
charset-normalizer 3.1.0 pypi_0 pypi
click 8.1.3 pypi_0 pypi
colorama 0.4.6 pypi_0 pypi
cpuonly 1.0 0 pytorch
cudatoolkit 11.3.1 h9edb442_10 conda-forge
cycler 0.11.0 pypi_0 pypi
ffmpeg 4.3 hf484d3e_0 pytorch
fonttools 4.38.0 pypi_0 pypi
freetype 2.10.4 h0708190_1 conda-forge
gmp 6.2.1 h58526e2_0 conda-forge
gnutls 3.6.13 h85f3911_1 conda-forge
idna 3.4 pypi_0 pypi
importlib-metadata 6.6.0 pypi_0 pypi
intel-openmp 2021.4.0 h06a4308_3561
jpeg 9b h024ee3a_2
kiwisolver 1.4.4 pypi_0 pypi
lame 3.100 h7f98852_1001 conda-forge
ld_impl_linux-64 2.38 h1181459_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libiconv 1.17 h166bdaf_0 conda-forge
libpng 1.6.37 h21135ba_2 conda-forge
libstdcxx-ng 11.2.0 h1234567_1
libtiff 4.0.9 he85c1e1_2
libuv 1.43.0 h7f98852_0 conda-forge
markdown 3.4.3 pypi_0 pypi
markdown-it-py 2.2.0 pypi_0 pypi
matplotlib 3.5.3 pypi_0 pypi
mdurl 0.1.2 pypi_0 pypi
mkl 2021.4.0 h06a4308_640
mkl-service 2.4.0 py37h402132d_0 conda-forge
mkl_fft 1.3.1 py37h3e078e5_1 conda-forge
mkl_random 1.2.2 py37h219a48f_0 conda-forge
mmcv-full 1.3.15 pypi_0 pypi
model-index 0.1.11 pypi_0 pypi
ncurses 6.4 h6a678d5_0
nettle 3.6 he412f7d_0 conda-forge
ninja 1.11.0 h924138e_0 conda-forge
numpy 1.21.5 py37h6c91a56_3
numpy-base 1.21.5 py37ha15fc14_3
olefile 0.46 pyh9f0ad1d_1 conda-forge
opencv-python 4.7.0.72 pypi_0 pypi
openh264 2.1.1 h780b84a_0 conda-forge
openmim 0.3.7 pypi_0 pypi
openssl 1.1.1t h7f8727e_0
ordered-set 4.1.0 pypi_0 pypi
packaging 23.1 pypi_0 pypi
pandas 1.3.5 pypi_0 pypi
pillow 6.2.2 pypi_0 pypi
pip 22.3.1 py37h06a4308_0
pygments 2.15.1 pypi_0 pypi
pyparsing 3.0.9 pypi_0 pypi
python 3.7.16 h7a1cb2a_0
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.7 2_cp37m conda-forge
pytorch 1.9.1 py3.7_cpu_0 [cpuonly] pytorch
pytz 2023.3 pypi_0 pypi
pyyaml 6.0 pypi_0 pypi
readline 8.2 h5eee18b_0
requests 2.30.0 pypi_0 pypi
rich 13.3.5 pypi_0 pypi
scipy 1.7.3 pypi_0 pypi
setuptools 65.6.3 py37h06a4308_0
shapely 2.0.1 pypi_0 pypi
six 1.16.0 pyh6c4a22f_0 conda-forge
sqlite 3.41.2 h5eee18b_0
tabulate 0.9.0 pypi_0 pypi
terminaltables 3.1.10 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
tomli 2.0.1 pypi_0 pypi
torchaudio 0.9.1 py37 pytorch
torchvision 0.10.1 py37_cpu [cpuonly] pytorch
tqdm 4.65.0 pypi_0 pypi
typing_extensions 4.5.0 pyha770c72_0 conda-forge
urllib3 2.0.2 pypi_0 pypi
wheel 0.38.4 py37h06a4308_0
xz 5.4.2 h5eee18b_0
yapf 0.33.0 pypi_0 pypi
zipp 3.15.0 pypi_0 pypi
zlib 1.2.13 h5eee18b_0
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Mar_21_19:15:46_PDT_2021
Cuda compilation tools, release 11.3, V11.3.58
Build cuda_11.3.r11.3/compiler.29745058_0
Error:
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1672, in _run_ninja_build
env=env)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/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/plkang/code/Evolved_RVSA/OBBDetection/setup.py", line 318, in <module>
zip_safe=False)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/command/develop.py", line 34, in run
self.install_for_development()
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/command/develop.py", line 114, in install_for_development
self.run_command('build_ext')
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 84, in run
_build_ext.run(self)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
self.build_extensions()
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 709, in build_extensions
build_ext.build_extensions(self)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 468, in build_extensions
self._build_extensions_serial()
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 494, in _build_extensions_serial
self.build_extension(ext)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
_build_ext.build_extension(self, ext)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 556, in build_extension
depends=ext.depends,
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 539, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1360, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/home/plkang/software/Anaconda/Anaconda3/envs/mmcv/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1682, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
error: subprocess-exited-with-error
× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /home/plkang/software/Anaconda/Anaconda3/envs/mmcv/bin/python -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize
try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute `setup.py` since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)
__file__ = %r
sys.argv[0] = __file__
if os.path.exists(__file__):
filename = __file__
with tokenize.open(__file__) as f:
setup_py_code = f.read()
else:
filename = "<auto-generated setuptools caller>"
setup_py_code = "from setuptools import setup; setup()"
exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/home/plkang/code/Evolved_RVSA/OBBDetection/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' develop --no-deps
cwd: /home/plkang/code/Evolved_RVSA/OBBDetection/
error: subprocess-exited-with-error
× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Hei gays, I have solve this problem for my own. If you want to run this code with A100 GPU, you really should install the right torch, cuda, mmcv version. The following is my env, which may be helpful:
python=3.8.5
pytorch=1.9.0
cuda=11.1
mmcv-full=1.4.1
You install this repo as me, follow my command:
cd OBBDetection
conda create -n mmcv python=3.8.5 -y
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
conda activate mmcv
pip install -U openmim
mim install mmcv-full=1.4.1
pip install -v -e .
cd BboxToolkit
pip install -v -e .