Open matthewfeickert opened 2 years ago
So this is what a .bashrc_user
that works would look like
#!/usr/bin/env bash
export __HOME="/home/${USER}"
export HOME="/raid/projects/${USER}"
# Enable .pythonrc.py
if [ -f "${HOME}/.pythonrc.py" ]; then
export PYTHONSTARTUP="${HOME}/.pythonrc.py"
fi
# Ensure local virtualenv setup
if [ ! -f "${HOME}/opt/venv/bin/virtualenv" ]; then
curl -sL --location --output /tmp/virtualenv.pyz https://bootstrap.pypa.io/virtualenv.pyz
python3 /tmp/virtualenv.pyz ~/opt/venv
~/opt/venv/bin/pip install --upgrade pip
~/opt/venv/bin/pip install virtualenv
mkdir -p ~/bin # Ensure exists if new machine
ln -s ~/opt/venv/bin/virtualenv ~/bin/virtualenv
fi
# pyenv setup
export PYENV_ROOT="${HOME}/.pyenv"
export PATH="${PYENV_ROOT}/bin:${PATH}"
eval "$(pyenv init -)"
# Place pyenv shims on path
if [[ ":${PATH}:" != *":$(pyenv root)/shims:"* ]]; then
eval "$(pyenv init --path)"
fi
# Place pyenv-virtualenv shims on path
if [[ ":${PATH}:" != *":$(pyenv root)/plugins/pyenv-virtualenv/shims:"* ]]; then
eval "$(pyenv virtualenv-init -)"
fi
# default venv
if [ -d "${HOME}/.pyenv/versions/base" ]; then
pyenv activate base
fi
# Add GPG key
export GPG_TTY=$(tty)
# User specific environment and startup programs
cd "${HOME}"
PATH="${PATH}:${HOME}/.local/bin:${HOME}/bin"
export PATH
After the NCSA team setup a login node for the HAL DGX box (c.f. Access hal-dgx and overdrive with hal-login3 Node) the
.bash_profile
based setup workflow failed asSo as the NCSA team
then when an interactive session on HAL DGX is requested it will not be a login shell and so
~/.bash_profile
will never be sourced.The solution then is to move all the components that were in
~.bash_profile
into~/.basrc_user
. So this will require rewrites ofmigrate_home.sh
andpyenv_setup.sh
.