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
This is probably useful to have documented long term, thanks @noahbenson for raising this question!
Question on Slack
I’m trying to find the appropriate place in the environment startup to put a bash command that echos some text into ~/.npythyrc for each student.
Response
Whatever is done in the Docker image we built withint /home/jovyan (which is ~/) will be overridden when we mount the user attached storage. Due to that, we cannot add something from the postStart hook directly to ~/
Due to the override of ~/, I've setup a script that run following startup, which allow us to take some actions after the ~/ folder has been overridden by the users storage. @ariel Rokem pointed out what mechanism is invoking that script.
If we want, we can use that script to write something to the user folder. It's very important that this script never fails though, because that would crash the attempt for a user to start their server.
I suggest what you do in this file, is to create a symbolic link to a file you add to ~/data somewhere. Then if you want to change the content of the ~/.npythyrc file students have, it will be an quick update that doesn't require their servers to be restarted or you making additional PRs etc.
I think this addition would do the trick. I'll create such file with nothing in it, and update this script. Then you can update it in ~/data/misc/.npythyrc and see it reflected soon afterwards.
# Provide a symbolic link to /nh/data/misc/.npythyrc
[ -f~/.npythyrc ] || ln -s /nh/data/misc/.npythyrc ~/.npythyrc ||true
The text was updated successfully, but these errors were encountered:
This is probably useful to have documented long term, thanks @noahbenson for raising this question!
Question on Slack
Response
The text was updated successfully, but these errors were encountered: