mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
fix: update pyenv installation script to use user-specific environment file
- Changed the installation script for pyenv to create a user-specific environment file at $HOME/.pyenv-env.sh instead of a system-wide file in /etc/profile.d/. - Updated the script to source the new environment file, ensuring that the pyenv setup is applied correctly for the user. - This change improves the flexibility and usability of the pyenv installation in Docker environments.
This commit is contained in:
@@ -35,8 +35,8 @@ apt-get install -y \
|
||||
# Install pyenv
|
||||
curl https://pyenv.run | bash
|
||||
|
||||
# Create a file in /etc/profile.d/
|
||||
cat > /etc/profile.d/pyenv.sh << 'EOF'
|
||||
# Create a file in $HOME/.pyenv-env.sh
|
||||
cat > $HOME/.pyenv-env.sh << 'EOF'
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
@@ -44,10 +44,10 @@ eval "$(pyenv virtualenv-init -)"
|
||||
EOF
|
||||
|
||||
# Make the file executable
|
||||
chmod +x /etc/profile.d/pyenv.sh
|
||||
chmod +x $HOME/.pyenv-env.sh
|
||||
|
||||
# Source it immediately for the rest of the installation
|
||||
source /etc/profile.d/pyenv.sh
|
||||
source $HOME/.pyenv-env.sh
|
||||
|
||||
# Install python ${version} via pyenv
|
||||
pyenv install ${version}
|
||||
|
||||
Reference in New Issue
Block a user