MaskFaceGAN
MaskFaceGAN copied to clipboard
Command '['ninja', '-v']' returned non-zero exit status 1.
Something's not right with ninja
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1900, in _run_ninja_build
subprocess.run(
File "/home/user/anaconda3/envs/mfg5/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
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 "/home/user/Documents/abhishek/face/MaskFaceGAN/main.py", line 7, in <module>
from trainer import Trainer
File "/home/user/Documents/abhishek/face/MaskFaceGAN/trainer.py", line 7, in <module>
from model_module import batch_mse_loss
File "/home/user/Documents/abhishek/face/MaskFaceGAN/model_module.py", line 6, in <module>
from models import BranchedTiny, FaceParser, Generator
File "/home/user/Documents/abhishek/face/MaskFaceGAN/models/__init__.py", line 3, in <module>
from .stylegan2 import Generator
File "/home/user/Documents/abhishek/face/MaskFaceGAN/models/stylegan2/__init__.py", line 1, in <module>
from .model import Generator
File "/home/user/Documents/abhishek/face/MaskFaceGAN/models/stylegan2/model.py", line 11, in <module>
from .op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
File "/home/user/Documents/abhishek/face/MaskFaceGAN/models/stylegan2/op/__init__.py", line 1, in <module>
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "/home/user/Documents/abhishek/face/MaskFaceGAN/models/stylegan2/op/fused_act.py", line 10, in <module>
fused = load(
File "/home/user/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1284, in load
return _jit_compile(
File "/home/user/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1508, in _jit_compile
_write_ninja_file_and_build_library(
File "/home/user/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1623, in _write_ninja_file_and_build_library
_run_ninja_build(
File "/home/user/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1916, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'fused': [1/2] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/bellman/.local/lib/python3.10/site-packages/torch/include -isystem /home/bellman/.local/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/bellman/.local/lib/python3.10/site-packages/torch/include/TH -isystem /home/bellman/.local/lib/python3.10/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/bellman/anaconda3/envs/mfg5/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /home/bellman/Documents/abhishek/face/MaskFaceGAN/models/stylegan2/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
FAILED: fused_bias_act_kernel.cuda.o
/usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/bellman/.local/lib/python3.10/site-packages/torch/include -isystem /home/bellman/.local/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/bellman/.local/lib/python3.10/site-packages/torch/include/TH -isystem /home/bellman/.local/lib/python3.10/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/bellman/anaconda3/envs/mfg5/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /home/bellman/Documents/abhishek/face/MaskFaceGAN/models/stylegan2/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
/bin/sh: 1: /usr/local/cuda/bin/nvcc: not found
ninja: build stopped: subcommand failed.
Hi,
it seems that cuda is not properly installed. Can you try reinstalling?
For other compilation issues I have also found this dockerfile to be working well.