Cannot build docker image
marcoct opened this issue · comments
When building the docker image:
docker build -t ubuntu/redner:gpu -f manylinux-gpu.Dockerfile .
The process fails at this step due to an apparent issue with auditwheel
:
RUN if [ -d "build" ]; then rm -rf build; fi && REDNER_CUDA=1 PROJECT_NAME=redner-gpu conda run -n py38 python -m pip wheel -w /dist --verbose . && for f in /dist/redner*-linux_*.whl; do auditwheel repair "$f" -w /dist; done
The last lines of the printout and the error message are:
Created temporary directory: /tmp/pip-unpack-zazdhxcc
Saved /dist/numpy-1.19.5-cp38-cp38-manylinux2010_x86_64.whl
Saved /dist/Pillow-8.1.0-cp38-cp38-manylinux1_x86_64.whl
Saved /dist/scikit_image-0.18.1-cp38-cp38-manylinux1_x86_64.whl
Saved /dist/matplotlib-3.3.3-cp38-cp38-manylinux1_x86_64.whl
Saved /dist/kiwisolver-1.3.1-cp38-cp38-manylinux1_x86_64.whl
Saved /dist/PyWavelets-1.1.1-cp38-cp38-manylinux1_x86_64.whl
Saved /dist/scipy-1.6.0-cp38-cp38-manylinux1_x86_64.whl
Building wheels for collected packages: redner-gpu
Created temporary directory: /tmp/pip-wheel-3galg8hh
Building wheel for redner-gpu (setup.py): started
Destination directory: /tmp/pip-wheel-3galg8hh
Building wheel for redner-gpu (setup.py): finished with status 'done'
Created wheel for redner-gpu: filename=redner_gpu-0.4.28-cp38-cp38-linux_x86_64.whl size=31881666 sha256=65cc3b6acc9fdee0197b2dbde425bc8ac29afc6e392d4cef67f4a7ecce1d188d
Stored in directory: /tmp/pip-ephem-wheel-cache-bsl14vx5/wheels/40/5d/89/f38b7a58cbc6f6bdff423c409ca06a097d4abae527d8c17f06
Successfully built redner-gpu
Removed build tracker: '/tmp/pip-req-tracker-v6r_1vby'
Traceback (most recent call last):
File "/usr/local/bin/auditwheel", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/auditwheel/main.py", line 47, in main
rval = args.func(args, p)
File "/usr/local/lib/python3.6/dist-packages/auditwheel/main_repair.py", line 45, in execute
from .repair import repair_wheel
File "/usr/local/lib/python3.6/dist-packages/auditwheel/repair.py", line 14, in <module>
from .wheeltools import InWheelCtx, add_platforms
File "/usr/local/lib/python3.6/dist-packages/auditwheel/wheeltools.py", line 15, in <module>
from wheel.util import urlsafe_b64encode, open_for_csv, native # type: ignore
ImportError: cannot import name 'open_for_csv'
The command '/bin/sh -c if [ -d "build" ]; then rm -rf build; fi && REDNER_CUDA=1 PROJECT_NAME=redner-gpu conda run -n py38 python -m pip wheel -w /dist --verbose . && for f in /dist/redner*-linux_*.whl; do auditwheel repair "$f" -w /dist; done' returned a non-zero code: 1
I think this is due to an incompatibility between auditwheel and wheel versions. I worked around this by adding:
RUN pip install auditwheel
before the "build wheels and convert" section of the dockerfiles.
I then run into a second problem which I think is that the base tensorflow image isn't actually manylinux1 compatible so the auditwheel command complains about the presence of too-recent versioned symbols. I worked around this by adding
--plat linux_x86_64
to the auditwheel commands.
I'm not convinced either of these are a great solution but it might help for the time being.