ubuntu@ubuntu:~/DragGAN$ python3 gradio_app.py
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1893, in _run_ninja_build
subprocess.run(
File "/usr/lib/python3.10/subprocess.py", line 524, 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/ubuntu/DragGAN/gradio_app.py", line 9, in
from drag_gan import drag_gan, stylegan2
File "/home/ubuntu/DragGAN/drag_gan.py", line 12, in
from stylegan2.model import Generator
File "/home/ubuntu/DragGAN/stylegan2/model.py", line 8, in
from .op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d, conv2d_gradfix
File "/home/ubuntu/DragGAN/stylegan2/op/init.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "/home/ubuntu/DragGAN/stylegan2/op/fused_act.py", line 11, in
fused = load(
File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1284, in load
return jit_compile(
File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1509, in jit_compile
write_ninja_file_and_build_library(
File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1624, in write_ninja_file_and_build_library
run_ninja_build(
File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1909, in run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'fused': [1/2] /usr/local/cuda/bin/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/ubuntu/.local/lib/python3.10/site-packages/torch/include -isystem /home/ubuntu/.local/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/ubuntu/.local/lib/python3.10/site-packages/torch/include/TH -isystem /home/ubuntu/.local/lib/python3.10/site-packages/torch/include/THC -isystem /usr/local/cuda/bin/include -isystem /usr/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++17 -c /home/ubuntu/DragGAN/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/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/ubuntu/.local/lib/python3.10/site-packages/torch/include -isystem /home/ubuntu/.local/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/ubuntu/.local/lib/python3.10/site-packages/torch/include/TH -isystem /home/ubuntu/.local/lib/python3.10/site-packages/torch/include/THC -isystem /usr/local/cuda/bin/include -isystem /usr/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++17 -c /home/ubuntu/DragGAN/stylegan2/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
/bin/sh: 1: /usr/local/cuda/bin/bin/nvcc: not found
ninja: build stopped: subcommand failed.
whereis cuda
export CUDA_HOME=/path/to/cuda