You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have working code that detects persistent vs. non-persistent home directories. It warns users which places are persistent and which do not persist between reboots.
We should add this bash script to the system and invoke it in .bashrc (I already verified this works). Already at least one person was confused about conda environments disappearing and this should greatly reduce users not remembering and losing files.
I will add this to the system and open a pull request soon (today or tomorrow), I just need to check again where things like this are added in the pipeline.
The code is:
#!/bin/bash#Checks if home drive is not mounted and raises warning in that case.
home_mount_fs=$(df /home/jovyan/ | tail -n 1 | perl -pe 's/.* \//\//')if [[ "$home_mount_fs"=="/home/jovyan" ]];thenecho"The home directory /home/jovyan (aliased to ~) is saved on a workspace volume."echo"The contents of this directory persist between reboots. This includes installed packages, virtual environments, conda environments, etc."echo"Anything saved outside this folder will be deleted between reboots."echo"It's still strongly recommended to backup all important files (for instance, pushing code changes to GitLab)."elif [[ "$home_mount_fs"=="/" ]];thenecho"WARNING: The home directory is not persistent as a workspace volume has not been set."echo"All contents of this server (including the home directory /home/jovyan, aliased to ~) will be deleted when the server is rebooted."echo"This includes installed packages, virtual environments, conda environments, etc. These will need to be reinstalled every time the server is rebooted."echo"Any files or data you wish to keep need to be backed up outside the server (for instance, pushing code changes to GitLab)."echo"If this is not desired, please create a new notebook server that includes a workspace volume."elseecho"Unable to detect if home directory is persistent (/home/jovyan, aliased to ~)."echo"If the server is rebooted, it's possible the contents of that folder (along with everything else) could be lost, so be sure to save anything of value outside the server."fi
The text was updated successfully, but these errors were encountered:
I have working code that detects persistent vs. non-persistent home directories. It warns users which places are persistent and which do not persist between reboots.
We should add this bash script to the system and invoke it in .bashrc (I already verified this works). Already at least one person was confused about conda environments disappearing and this should greatly reduce users not remembering and losing files.
I will add this to the system and open a pull request soon (today or tomorrow), I just need to check again where things like this are added in the pipeline.
The code is:
The text was updated successfully, but these errors were encountered: