Skip to content

Commit 6e2110a

Browse files
author
Alan Christie
committed
feat: Copy content of /home/code/copy-to-home if it exists
1 parent f2352b0 commit 6e2110a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

operator/handlers.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@
5959
)
6060
_POD_NODE_SELECTOR_VALUE: str = os.environ.get("JO_POD_NODE_SELECTOR_VALUE", "yes")
6161

62-
# A custom startup script.
63-
# This is executed as the container "command"
64-
# It writes a new a .bashrc and copies
65-
# the .bash_profile and jupyter_notebook_config.json file into place
66-
# before running 'jupyter lab'.
62+
# A custom startup script, executed as the container "command".
63+
#
64+
# It writes a new a .bashrc, copies the .bash_profile and jupyter_notebook_config.json
65+
# files into place and then copies the file tree from /home/code/copy-to-home
66+
# to the user's home directory before running 'jupyter lab'.
6767
#
6868
# Working directory is the Project directory,
6969
# and HOME is the project instance directory
@@ -88,6 +88,11 @@
8888
cp /etc/jupyter_notebook_config.json ~
8989
fi
9090
91+
if [ -d /home/code/copy-to-home ]; then
92+
echo "Copying copy-to-home content"
93+
cp -R -u /home/code/copy-to-home/* ~
94+
fi
95+
9196
jupyter lab --config=~/jupyter_notebook_config.json
9297
"""
9398

0 commit comments

Comments
 (0)