I’m having problems with scikit-image and Docker. It works fine in non-virtual environment on Ubuntu 22.04.1 and Python 3.11.1, of course. Here is my Dockerfile:
FROM python:3-slim
ADD arc-1.py /
RUN pip install numpy matplotlib more_itertools scikit-image[alldeps]
CMD ["python", "./arc-1.py"]
I also tried:
FROM python:3-slim
ADD arc-1.py /
RUN pip install numpy matplotlib more_itertools scikit-image
CMD ["python", "./arc-1.py"]
Docker build ends with this error in both cases:
#7 119.4 Building wheel for scikit-image (pyproject.toml): finished with status 'error'
#7 119.4 error: subprocess-exited-with-error
#7 119.4
#7 119.4 × Building wheel for scikit-image (pyproject.toml) did not run successfully.
#7 119.4 │ exit code: 1
#7 119.4 ╰─> [760 lines of output]
#7 119.4 setup.py:9: DeprecationWarning:
#7 119.4
#7 119.4 `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
#7 119.4 of the deprecation of `distutils` itself. It will be removed for
#7 119.4 Python >= 3.12. For older Python versions it will remain present.
#7 119.4 It is recommended to use `setuptools < 60.0` for those Python versions.
#7 119.4 For more details, see:
#7 119.4 https://numpy.org/devdocs/reference/distutils_status_migration.html
....
#7 119.4 ERROR: Failed building wheel for scikit-image
#7 119.4 Failed to build scikit-image
#7 119.4 ERROR: Could not build wheels for scikit-image, which is required to install pyproject.toml-based projects
Is there a solution to this problem? Prebuild docker image with scikit-image, perhaps?