@@ -22,13 +22,17 @@ RUN bash ./setup_18.x && $APT_INSTALL make build-essential net-tools apt-utils l
2222 libsqlite3-dev wget curl llvm libncurses-dev xz-utils tk-dev libffi-dev liblzma-dev git
2323
2424# pyenv install python
25+ ENV PYENV_ROOT=/shared/.pyenv
26+ ENV PYTHONUSERBASE="$PYENV_ROOT/versions/$PYTHON_VERSION"
27+ ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PYENV_ROOT/versions/'$PYTHON_VERSION' /bin:$PATH
28+
2529RUN echo '# pyenv setup' > /etc/profile.d/pyenv.sh
2630RUN echo 'export PYENV_ROOT=/shared/.pyenv' >> /etc/profile.d/pyenv.sh
31+ RUN echo 'export PYTHONUSERBASE="$PYENV_ROOT/versions/$PYTHON_VERSION"' >> /etc/profile.d/pyenv.sh
2732RUN echo 'export PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PYENV_ROOT/versions/' $PYTHON_VERSION'/bin:$PATH' >> /etc/profile.d/pyenv.sh
2833RUN echo 'eval "$(pyenv init -)"' >> /etc/profile.d/pyenv.sh
2934RUN chmod +x /etc/profile.d/pyenv.sh
30- RUN source /etc/profile.d/pyenv.sh && \
31- chmod +x ./pyenv.run && \
35+ RUN chmod +x ./pyenv.run && \
3236 ./pyenv.run && pyenv update && pyenv install $PYTHON_VERSION && pyenv global $PYTHON_VERSION && pyenv rehash && \
3337 update-alternatives --install /usr/bin/python python $PYENV_ROOT/shims/python3 0 && \
3438 update-alternatives --install /usr/bin/python3 python3 $PYENV_ROOT/shims/python3 0 && \
@@ -42,7 +46,6 @@ RUN $PIP_INSTALL --user --upgrade pip oauthlib pyjwt httplib2 "numpy==1.26.4" fo
4246
4347# install python packages..
4448RUN $PIP_INSTALL ./bzt*whl chardet
45- ENV PATH=/shared/.pyenv/versions/$PYTHON_VERSION/bin:$PATH
4649
4750RUN $APT_UPDATE && $APT_INSTALL \
4851 unzip software-properties-common apt-transport-https \
0 commit comments