Hi,
I’m trying to compile my re-trained yolov8 model to an hef file. I am trying to get the model zoo and dataflow compiler running in a docker container. I am getting a problem when I try to pip install the model zoo. I am using the .whl file from the hailo developer zone (hailo_model_zoo-2.13.0-py3-none-any.whl).
I’m getting an error when it tries to install ‘lap’, indicating that it is trying to us deprecated distutils from numpy.
Here is the error
Blockquote
Building wheels for collected packages: lap, scikit-image, antlr4-python3-runtime, matplotlib, fire
Building wheel for lap (setup.py) … error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [28 lines of output]
/tmp/pip-install-8wmdj0ib/lap_d4c5ef0acb78440d9ccea13b6e347bf7/setup.py:4: DeprecationWarning: pkg_resources is deprecated as an API. See Package Discovery and Resource Access using pkg_resources - setuptools 75.6.0.post20241212 documentation
from pkg_resources import parse_version
Partial import of lap during the build process.
/tmp/pip-install-8wmdj0ib/lap_d4c5ef0acb78440d9ccea13b6e347bf7/setup.py:223: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
Blockquote
My Dockerfile looks like this:
# Update and install essential build tools and libraries
RUN apt-get update && \
apt-get install -y --no-install-recommends \
bash \
build-essential \
curl \
liblapack-dev \
libatlas-base-dev \
gfortran \
python3-distutils \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Upgrade pip, setuptools, and wheel
RUN python3 -m pip install --upgrade pip setuptools wheel
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements file and install dependencies
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
# Command to keep the container running by default (can be overridden at runtime)
CMD ["/bin/bash"]
Any ideas?
Is there something special I need to consider in my docker image to make this work?