From b774e5f189cb42b18dd70cee5f6fdecd149df533 Mon Sep 17 00:00:00 2001 From: Sameer Sheorey Date: Fri, 13 Sep 2024 15:19:18 -0700 Subject: [PATCH] add path to python open3d cli --- docker/Dockerfile.ci | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile.ci b/docker/Dockerfile.ci index 00447fb7fa3..544f791299b 100644 --- a/docker/Dockerfile.ci +++ b/docker/Dockerfile.ci @@ -91,16 +91,20 @@ RUN apt-get update && apt-get install -y \ # pyenv or Intel Python # The pyenv python paths are used during docker run, in this way docker run -# does not need to activate the environment again. +# does not need to activate the environment again. +# The soft link from the python patch level version to the python mino version +# ensures python wheel commands (i.e. open3d) are in PATH, since we don't know +# which patch level pyenv will install (latest). ENV PYENV_ROOT=/root/.pyenv -ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" +ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PYENV_ROOT/versions/$PYTHON_VERSION/bin:$PATH" ENV PATH="/opt/intel/oneapi/intelpython/latest/bin:${PATH}" RUN if [ "${BUILD_SYCL_MODULE}" = "OFF" ]; then \ curl https://pyenv.run | bash \ && pyenv update \ && pyenv install $PYTHON_VERSION \ && pyenv global $PYTHON_VERSION \ - && pyenv rehash; \ + && pyenv rehash \ + && ln -s $PYENV_ROOT/versions/${PYTHON_VERSION}* $PYENV_ROOT/versions/${PYTHON_VERSION}; \ fi RUN python --version && pip --version