The inference service pipelines seem to have an intermittent bug, where some of the images occasionally error when invoking pip during the image builds:
/usr/bin/python3.7: Error while finding module specification for 'pip' (AttributeError: module '__main__' has no attribute '__file__')
It seems that this is due to a bug in a recent release of setuptools: https://github.com/pypa/setuptools/issues/3002#issuecomment-1006266993
The bug should be fixed in pip v60.3.1
https://github.com/pypa/setuptools/issues/3002#issuecomment-1006710343
This error doesn't happen on every build (I can do 'recheck' and sometimes it will pass). This makes me think that there is a node using an outdated version of pip somewhere.