0

I try to build a docker container with a python script on a raspberry pi.

I' using the arm32v7/python latest image (3.12), but also tried it with 3.9 and 3.10 images.

In my Dockerfile I first update pip and then try to install my requirements. But when it tries to install PyWavelets or scipy it wont move further. I just get "installing build dependencies: still running".

 Downloading PyWavelets-1.4.1.tar.gz (4.6 MB)                                                                                                                           
 => => #       4.6/4.6 MB 11.9 MB/s eta 0:00:00                                                                                           
 => => #   Installing build dependencies: started                                                                                                                                 
 => => #   Installing build dependencies: still running...      

After 30 mins it fails with

� Building wheel for ninja (pyproject.toml) did not run successfully.
#0 2857.1         exit code: 1
#0 2857.1         > [11 lines of output]
#0 2857.1             Traceback (most recent call last):
#0 2857.1               File "/tmp/pip-build-env-roddjnvw/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 612, in setup
#0 2857.1                 cmkr = cmaker.CMaker(cmake_executable)
#0 2857.1                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 2857.1               File "/tmp/pip-build-env-roddjnvw/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 149, in __init__
#0 2857.1                 self.cmake_version = get_cmake_version(self.cmake_executable)
#0 2857.1                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 2857.1               File "/tmp/pip-build-env-roddjnvw/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 104, in get_cmake_version
#0 2857.1                 raise SKBuildError(
#0 2857.1
#0 2857.1             Problem with the CMake installation, aborting build. CMake executable is cmake
#0 2857.1             [end of output]

I already tried to install them via their apt packages (python3-pywt, python3-scipy) and skip the ones in my requirements.txt, but then I get an error in the installer.

I also tried to use https://www.piwheels.org/simple as index url in my install command but then it wont find any scipy installation candidate.

My Dockerfile:

FROM arm32v7/python
RUN apt-get update && apt-get -y install vim python3-pywt python3-scipy
WORKDIR /app
COPY main.py /app/main.py
COPY requirements.txt /app/requirements.txt
RUN pip install --upgrade pip
#RUN pip install --index-url=https://www.piwheels.org/simple --no-cache-dir -r requirements.txt
RUN pip install -r requirements.txt

My requirements.txt

certifi==2022.12.7
charset-normalizer==2.1.1
idna==3.4
mysql-connector-python==8.0.25
numpy==1.24.0
Pillow==9.3.0
protobuf==3.20.1
python-dotenv==0.21.0
PyWavelets==1.4.1
requests==2.28.1
scipy==1.9.3
update-checker==0.18.0
urllib3==1.26.13
websocket-client==1.4.2
Henry
  • 108
  • 1
  • 3
  • 9

0 Answers0