![]() If someone is interested I can describe it in detail in a few days. Now it is organized like: WasteClassifierĭon't know exact reason behind this, and I cannot analyze this right now. Previously it was organized like: WasteClassifier I have tried exporting paths, changing installation paths, changing sys.path in Python, installing different pips ( apt-get install pip / apt-get install python-pip), using different Python and Ubuntu versions in the image, none of this works.ĮDIT: Thank you for help, the solution was to reorganize app structure as and said. What might be the problem here? Is it more like Python or Docker issue, where should I look? Made additional step to print all the importables, where my app is listed, although I cannot import it in the same step, here is screenshot of it.Īlso it is listed in pip libs, pip list screenshot.Īpp works correctly outside of container on Ubuntu. ![]() When running main script from the app I get the following import error: ModuleNotFoundError: No module named 'WasteClassifier' RUN python3 -m pip install -target="/usr/lib/python3.10/dist-packages" /opt/WasteClassifier ![]() RUN export PYTHONPATH="/usr/local/lib/python3.10/dist-packages" RUN apt update & apt-get -y install sudo & sudo apt-get install -y python3 python3-pip ![]() Here is Dockerfile main functionality: FROM ubuntuĬOPY WasteClassifier /opt/WasteClassifier ![]() Basically I want to install it via pip inside the container and run main script that imports this package as dependency. I am having problems with accessing my app inside Docker container. ![]()
0 Comments
Leave a Reply. |