mcahny / Deep-Video-Inpainting

Official pytorch implementation for "Deep Video Inpainting" (CVPR 2019)
508 stars 95 forks source link

Is there any way to install the project without cuda and gpu ? #18

Closed mahbubcseju closed 4 years ago

mahbubcseju commented 4 years ago

I was trying to install the project using CPU, Pytorch 0.4.0 version . But Getting some error. I think it is because of the absence of CUDA. Is there any way to run the code without CUDA and GPU?? Or is there any way to get recover from these errors??

Error:

Compiling resample2d kernels by nvcc...
rm: cannot remove 'Resample2d_kernel.o': No such file or directory
./make.sh: line 9: nvcc: command not found
In file included from /home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:4:0,
                 from _resample2d.c:493:
/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/THC/THCGeneral.h:12:18: fatal error: cuda.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/distutils/unixccompiler.py", line 116, in _compile
    extra_postargs)
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/site-packages/cffi/ffiplatform.py", line 51, in _build
    dist.run_command('build_ext')
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/distutils/command/build_ext.py", line 338, in run
    self.build_extensions()
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/distutils/command/build_ext.py", line 447, in build_extensions
    self._build_extensions_serial()
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/distutils/command/build_ext.py", line 472, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/distutils/command/build_ext.py", line 532, in build_extension
    depends=ext.depends)
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/distutils/ccompiler.py", line 574, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/home/mahbubcseju/anaconda3/envs/ML/lib/python3.5/distutils/unixccompiler.py", line 118, in _compile
    raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
sendjasni commented 4 years ago

Facing the same issue here, how did you solved it?

ashual commented 4 years ago

These two lines solved the problem for me $ export C_INCLUDE_PATH=${CUDA_HOME}/include:${C_INCLUDE_PATH} $ export LIBRARY_PATH=${CUDA_HOME}/lib64:$LIBRARY_PATH