sberbank-ai-lab / LightAutoML

LAMA - automatic model creation framework
Apache License 2.0
887 stars 92 forks source link

Error while import in docker image ubi8 (redhat) #80

Closed Maksim-Vatkin closed 2 years ago

Maksim-Vatkin commented 2 years ago

I've got the issue while using lightautoml inside docker image build on base image ubi8. The command import lightautoml lead to error (see a screenshot) image

PhySci commented 2 years ago

@Maksim-Vatkin I suspect not all requirements have been installed into the docker image. It's a common problem when minimal base images are being used (alpine or ubi8). I would suggest to run the image (docker run ...), connect to it (docker exec ...), open python console and try to import CV2 package. If you couldn't do it, it means that the source of problem isn't LightAutoML, but missing dependencies of the CV2.

alexmryzhkov commented 2 years ago

Hello @Maksim-Vatkin @PhySci,

As we discussed in the private messages with @Maksim-Vatkin, the working configuration for this case is:

FROM registry.access.redhat.com/ubi8/python-38

RUN pip3 install --upgrade pip
RUN pip3 install lightautoml
RUN pip3 install --force-reinstall opencv-python-headless

ENTRYPOINT ["bash", "-c"]
CMD ["echo 'Needs executable to be passed as argument'"]

I'll close the issue for now but if the solution doesn't work for your case please re-open the issue.

Alex