Skip to content

Commit e8a27a1

Browse files
committed
Fix --user location
1 parent a534c1f commit e8a27a1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
2529
RUN echo '# pyenv setup' > /etc/profile.d/pyenv.sh
2630
RUN 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
2732
RUN echo 'export PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PYENV_ROOT/versions/'$PYTHON_VERSION'/bin:$PATH' >> /etc/profile.d/pyenv.sh
2833
RUN echo 'eval "$(pyenv init -)"' >> /etc/profile.d/pyenv.sh
2934
RUN 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..
4448
RUN $PIP_INSTALL ./bzt*whl chardet
45-
ENV PATH=/shared/.pyenv/versions/$PYTHON_VERSION/bin:$PATH
4649

4750
RUN $APT_UPDATE && $APT_INSTALL \
4851
unzip software-properties-common apt-transport-https \

0 commit comments

Comments
 (0)