In the final image, I forgot to specify ENV PATH="/opt/venv/bin:$PATH", even though I mentioned in the question that I had added it. That’s why pip wasn’t available and the installation didn’t work as expected. Thanks everyone for your help and suggestions!