GithubHelp home page GithubHelp logo

Comments (12)

Corallo avatar Corallo commented on June 17, 2024

Hello bsrkhan.

We build a custom numpy to run using openblas on our camera.
As you see in the dockerfile we currently copy the built numpy manually in the example.
This way, pip is not properly aware that numpy is already installed, and when you install packages that have numpy as requirement you run into these kinds of problems.
We have in program to improve this system, but we can't provide an ETA yet.

TL;DR:
For the moment, you can try the following:

  • identify the packages that need numpy as requirement,
  • find all their dependencies and install them with pip (making sure that none of these dependencies requires numpy).
  • install the main package with --no-dependencies
    It is dirty but hopefully works.

Good luck.

from acap-computer-vision-sdk-examples.

bsrkhan avatar bsrkhan commented on June 17, 2024

Okay that makes sense, can you tell me where I will be able to find out when the program is released?

I'm trying to install one library at a time, starting with pandas. Checking the dependencies I get this:
C:\Users\rkhan>pip show pandas
Name: pandas
Version: 1.4.4
Summary: Powerful data structures for data analysis, time series, and statistics
Home-page: https://pandas.pydata.org
Author: The Pandas Development Team
Author-email: [email protected]
License: BSD-3-Clause
Location: c:\users\rkhan\appdata\local\programs\python\python310\lib\site-packages
Requires: numpy, python-dateutil, pytz
Required-by:

I updated the dockerfile to install python-dateutil and pytz, both of which install without issue.
ARG ARCH=armv7hf
ARG SDK_VERSION=1.2
ARG REPO=axisecp
ARG RUNTIME_IMAGE=arm32v7/ubuntu:20.04

FROM $REPO/acap-computer-vision-sdk:$SDK_VERSION-$ARCH AS cv-sdk
FROM ${RUNTIME_IMAGE}
COPY --from=cv-sdk /axis/python /
COPY --from=cv-sdk /axis/python-numpy /
COPY --from=cv-sdk /axis/python-tfserving /
COPY --from=cv-sdk /axis/opencv /
COPY --from=cv-sdk /axis/openblas /

WORKDIR /app
RUN python3 -m pip install --upgrade pip
RUN pip install requests
RUN pip install jsonpickle
RUN pip install python-dateutil
RUN pip install pytz
RUN pip install --no-dependencies pandas
COPY app/* /app/
CMD ["python3", "detector.py"]

I've added the --no-dependencies flag to pandas, but it is still trying to install dependencies. Is there something I'm missing?
output1.txt

from acap-computer-vision-sdk-examples.

Corallo avatar Corallo commented on June 17, 2024

It seems --no-dependencies doesn't exist anymore, use
pip install --no-deps pandas instead

from acap-computer-vision-sdk-examples.

bsrkhan avatar bsrkhan commented on June 17, 2024

I should have mentioned earlier I also tried using the --no-deps flag and --install-option="--no-deps", both still try to install numpy.

from acap-computer-vision-sdk-examples.

bsrkhan avatar bsrkhan commented on June 17, 2024

Is there any other way to get around this?

from acap-computer-vision-sdk-examples.

Corallo avatar Corallo commented on June 17, 2024

Hi
Unfortunately, we didn't find a work around yet.
We saw that by adding
RUN touch /usr/lib/python3.8/site-packages/numpy-1.17.3.egg-info to the Dockerfile
it seems you can "trick" pip to recognize the presence of numpy, so it is normally skipped if you try to install it and avoid the override, but this doesn't seem to work in the case of pandas, it seems it builds its dependencies regardless numpy is installed or not.

from acap-computer-vision-sdk-examples.

bsrkhan avatar bsrkhan commented on June 17, 2024

It doesn't seem to work for shapely either, I'll have to shelf this. When the program to improve this comes out, how can I be notified?

from acap-computer-vision-sdk-examples.

Corallo avatar Corallo commented on June 17, 2024

We'll update this issue, when we'll be able to improve the pip packaging

from acap-computer-vision-sdk-examples.

bsrkhan avatar bsrkhan commented on June 17, 2024

Thanks for the help with my issue, I'll wait for the improved pip packaging.

from acap-computer-vision-sdk-examples.

Corallo avatar Corallo commented on June 17, 2024

@bsrkhan I just would like to mention that this issue have not been prioritized, so even if we plan to address this problem, unfortunately we can't give an ETA for when that will be done.

from acap-computer-vision-sdk-examples.

Corallo avatar Corallo commented on June 17, 2024

Hey @bsrkhan

Maybe you can take a look at this issue @daniel-falk showed how you can install pandas.

This will work however only on aarch64 devices.

from acap-computer-vision-sdk-examples.

daniel-falk avatar daniel-falk commented on June 17, 2024

Hi @bsrkhan,

Feel free to contact me on [email protected] if you are interested in any further help. It should be possible to get pandas and shapely to work with the armv7 cameras too by building it together with the SDK.

from acap-computer-vision-sdk-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.