-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Run GFPGAN in docker container #103
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: mmenbawy <[email protected]>
hey @mmenbawy, I can't verify this MR... The build in your project is failing and I can't run the examples...
GFPGAN_1 | File "/usr/local/lib/python3.8/dist-packages/torch/utils/cpp_extension.py", line 1436, in _write_ninja_file_and_build_library
GFPGAN_1 | _write_ninja_file_to_build_library(
GFPGAN_1 | File "/usr/local/lib/python3.8/dist-packages/torch/utils/cpp_extension.py", line 1834, in _write_ninja_file_to_build_library
GFPGAN_1 | cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags()
GFPGAN_1 | File "/usr/local/lib/python3.8/dist-packages/torch/utils/cpp_extension.py", line 1606, in _get_cuda_arch_flags
GFPGAN_1 | arch_list[-1] += '+PTX'
GFPGAN_1 | IndexError: list index out of range
gfpgan_GFPGAN_1 exited with code 1 |
Running Docker-compose Build And Original Image
$ docker run -ti -v $PWD/inputs:/app/inputs -v $PWD/results:/app/results -v $PWD/experiments:/app/exps mostafaelmenbawy/gfpgan:latest python3 inference_gfpgan.py --model_path /app/exps/GFPGANv1.pth --test_path /app/inputs/whole_imgs --save_root /apps/results --arch original --channel 1
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
Traceback (most recent call last):
File "inference_gfpgan.py", line 7, in <module>
from basicsr.utils import imwrite
File "/usr/local/lib/python3.6/dist-packages/basicsr/__init__.py", line 3, in <module>
from .archs import *
File "/usr/local/lib/python3.6/dist-packages/basicsr/archs/__init__.py", line 16, in <module>
_arch_modules = [importlib.import_module(f'basicsr.archs.{file_name}') for file_name in arch_filenames]
File "/usr/local/lib/python3.6/dist-packages/basicsr/archs/__init__.py", line 16, in <listcomp>
_arch_modules = [importlib.import_module(f'basicsr.archs.{file_name}') for file_name in arch_filenames]
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.6/dist-packages/basicsr/archs/rrdbnet_arch.py", line 6, in <module>
from .arch_util import default_init_weights, make_layer, pixel_unshuffle
File "/usr/local/lib/python3.6/dist-packages/basicsr/archs/arch_util.py", line 13, in <module>
from basicsr.ops.dcn import ModulatedDeformConvPack, modulated_deform_conv
File "/usr/local/lib/python3.6/dist-packages/basicsr/ops/dcn/__init__.py", line 1, in <module>
from .deform_conv import (DeformConv, DeformConvPack, ModulatedDeformConv, ModulatedDeformConvPack, deform_conv,
File "/usr/local/lib/python3.6/dist-packages/basicsr/ops/dcn/deform_conv.py", line 19, in <module>
os.path.join(module_path, 'src', 'deform_conv_cuda_kernel.cu'),
File "/usr/local/lib/python3.6/dist-packages/torch/utils/cpp_extension.py", line 1136, in load
keep_intermediates=keep_intermediates)
File "/usr/local/lib/python3.6/dist-packages/torch/utils/cpp_extension.py", line 1347, in _jit_compile
is_standalone=is_standalone)
File "/usr/local/lib/python3.6/dist-packages/torch/utils/cpp_extension.py", line 1445, in _write_ninja_file_and_build_library
is_standalone=is_standalone)
File "/usr/local/lib/python3.6/dist-packages/torch/utils/cpp_extension.py", line 1834, in _write_ninja_file_to_build_library
cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags()
File "/usr/local/lib/python3.6/dist-packages/torch/utils/cpp_extension.py", line 1606, in _get_cuda_arch_flags
arch_list[-1] += '+PTX'
IndexError: list index out of range |
Signed-off-by: mmenbawy <[email protected]>
Signed-off-by: mmenbawy <[email protected]>
I fixed the pipeline and the error. The problem with the error was that the docker image was meant to run on GPUs only that's what I used the |
It doesn't build anymore :( Does anyone have a solution by any chance?
|
This should be merged and maintained |
Solved with a tip from @mmenbawy: Try to add the following cmd after the FROM in the Dockerfile
|
This no longer builds. Could someone please update the Dockerfile? Any help would be much appreciated. Thank you |
hello everyone, any idea about how to train GFPGAN model in docker container please !!!! |
Why we need it:
Issue: #102
Remarks for your reviewer:
I used my personal dockerhub account to store the docker image. After approving and before merging GFPGAN project can create a free dockerhub account and use it instead.