Dockerfile: Remove unneeded installation of python3-pip#1004
Dockerfile: Remove unneeded installation of python3-pip#1004kba merged 1 commit intoOCR-D:masterfrom
Conversation
The old solution caused installation partially in /usr/bin and others in /usr/local/bin. Now there is a real virtual environment which also fixes the warnings from pip because of running as root in Docker builds. Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
Duplicate of #1003
Why? |
Because it is unneeded as the commit message says? It was (re-)added in commit f1527a2 without giving a reason. |
Fixes: f1527a2 ("upgrade base image to 20.04") Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
PR (and commit message) updated to fix conflict with preceding PR. |
It says: That's not an explanation. Why are we investing so much time to remove a tiny package that is usually needed (except with the
IMO the burden for an explanation is still on your side (even if it had been removed earlier). |
|
This did create a regression – see new CI failure. So even if I can see your argument that in Docker we want /usr/local as venv and therefore must avoid conflict with /usr – that now necessitates doing your python3 -m pip trick in in core as well. |
|
😆 OK, that was a long way to to go to get back to where we were before we started messing with |
On top of that: in ocrd/core, we don't even manage venvs – everything is native/system-wide. So at least here we do need python3-pip. |
|
Why does the docker build try I am afraid both goes in the wrong direction. We should stick to using Python only in virtual environments, and then we can always use |
|
I will investigate it further tomorrow, but no more hotfixes today :) |
Like I said: in ocrd/core, we have no venv, only a system-wide installation. (Which is arguably better than the pseudo-venv in ocrd_all, but there we also need sub-venvs, so...)
Because that's what |
No need to: the only failure now comes from core-cuda, which we already knew would fail, because we (intentionally) did not update its base image to Ubuntu 20, so OpenCV does not build anymore. – Like I said, I am still investigating whether we can actually move towards cuda-11 libcudnn8. |
I just tried it in the Docker container, and |
In which container? |
|
I tried |
Still don't know an which state of the Dockerfile. This is becoming tedious. See original bug if you want to help. |
|
Ubuntu 20.04 and other current Linux distributions no longer provide Python 2. Its So with current supported software or when using virtual environments (my preferred way) |
Fixes: f1527a2 ("upgrade base image to 20.04")