GithubHelp home page GithubHelp logo

Comments (7)

elvintoh82 avatar elvintoh82 commented on August 27, 2024 1

Feeling adventurous, I tried to follow the original sequence. opencv-python then albumentations then ADDED a new line of uninstalling opencv-python-headless.

FROM ros:humble-ros-base
RUN apt-get update && apt-get install -y python3-pip
RUN pip install --upgrade pip
RUN pip install opencv-python==4.9.0.80
RUN pip install albumentations --no-binary albumentations
RUN pip uninstall opencv-python-headless

There were no errors during the uninstallation of headless. I then went into python to do some basic test of cv2.
import cv2 yields no error, but it is already damaged when I tried to print cv2.version (no such attribute), file shows empty. And some other basic functions shows problems as well.
Screenshot from 2024-06-12 10-05-21

from albumentations.

elvintoh82 avatar elvintoh82 commented on August 27, 2024

@Zeli0

from albumentations.

ternaus avatar ternaus commented on August 27, 2024

I am not really an expert on how pip handles depencencies, especially dynamic ones.

If someone knows how to do it better - would be great.

First issue that I see is that

pip install albumentations --no-binary albumentations

Does not behave as expected and! We do not have a check in CI/CD to check for that.

Second is that overall dynamic dependencies do not work as expected.

@elvintoh82

Does this work if write it like

RUN pip install opencv-python==4.9.0.80
RUN pip install albumentations --no-binary albumentations

I.e. switch lines?

from albumentations.

elvintoh82 avatar elvintoh82 commented on August 27, 2024

I am not really an expert on how pip handles depencencies, especially dynamic ones.

If someone knows how to do it better - would be great.

First issue that I see is that

pip install albumentations --no-binary albumentations

Does not behave as expected and! We do not have a check in CI/CD to check for that.

Second is that overall dynamic dependencies do not work as expected.

@elvintoh82

Does this work if write it like

RUN pip install opencv-python==4.9.0.80
RUN pip install albumentations --no-binary albumentations

I.e. switch lines?

Hi, did you instead mean run the installation of albumentations first, followed by installation of opencv-python?
I'll do a quick try now.

from albumentations.

elvintoh82 avatar elvintoh82 commented on August 27, 2024

I've tried reversing the sequence as stated above. pip installation of albumentations followed by opencv-python does not show any errors. But inside python, importing cv2 immediately breaks.
Screenshot from 2024-06-12 09-58-05

from albumentations.

ternaus avatar ternaus commented on August 27, 2024

What about

FROM ros:humble-ros-base
RUN apt-get update && apt-get install -y python3-pip
RUN pip install --upgrade pip
RUN pip uninstall opencv-python opencv-python-headless
RUN pip install albumentations --no-binary albumentations
RUN pip install opencv-python==4.9.0.80

Could ros:humble-ros-base has opencv opencv-heasdless being already instsalled so that is messes with the installation

from albumentations.

elvintoh82 avatar elvintoh82 commented on August 27, 2024

What about

FROM ros:humble-ros-base
RUN apt-get update && apt-get install -y python3-pip
RUN pip install --upgrade pip
RUN pip uninstall opencv-python opencv-python-headless
RUN pip install albumentations --no-binary albumentations
RUN pip install opencv-python==4.9.0.80

Could ros:humble-ros-base has opencv opencv-heasdless being already instsalled so that is messes with the installation

just did a quick check and no opencv exists under ros:humble-ros-base. Not even under "apt install"

from albumentations.

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.