From fca5fc34657d3b9d571b1dd52e66167b13ad2efe Mon Sep 17 00:00:00 2001 From: Abdalla Date: Sun, 29 Dec 2024 20:04:34 +0000 Subject: [PATCH] test commit 5 --- .../start-custom.sh | 19 +++++++++++++++++++ output/jupyterlab-cpu/start-custom.sh | 1 + output/jupyterlab-pytorch/start-custom.sh | 19 +++++++++++++++++++ output/jupyterlab-tensorflow/start-custom.sh | 19 +++++++++++++++++++ output/remote-desktop/start-custom.sh | 19 +++++++++++++++++++ output/rstudio/start-custom.sh | 19 +++++++++++++++++++ output/sas/start-custom.sh | 19 +++++++++++++++++++ resources/common/start-custom.sh | 19 +++++++++++++++++++ 8 files changed, 134 insertions(+) diff --git a/output/docker-stacks-datascience-notebook/start-custom.sh b/output/docker-stacks-datascience-notebook/start-custom.sh index 7e409509d..fbcde6b07 100755 --- a/output/docker-stacks-datascience-notebook/start-custom.sh +++ b/output/docker-stacks-datascience-notebook/start-custom.sh @@ -247,6 +247,25 @@ local({ EOF fi +# Check if the directory exists +if [ ! -d /home/$NB_USER/test ]; then + # Directory does not exist, create it + mkdir -p /home/$NB_USER/test + echo "Directory test created." +else + echo "Directory test already exists." +fi + +DIR="/home/$NB_USER/.gnupg" + +if [ -d "$DIR" ]; then + chmod 700 "$DIR" + echo "Permissions for $DIR set to 700." +else + echo "Directory $DIR does not exist." +fi + + echo "--------------------starting jupyter--------------------" /opt/conda/bin/jupyter server --notebook-dir=/home/${NB_USER} \ diff --git a/output/jupyterlab-cpu/start-custom.sh b/output/jupyterlab-cpu/start-custom.sh index a741085ec..fbcde6b07 100755 --- a/output/jupyterlab-cpu/start-custom.sh +++ b/output/jupyterlab-cpu/start-custom.sh @@ -265,6 +265,7 @@ else echo "Directory $DIR does not exist." fi + echo "--------------------starting jupyter--------------------" /opt/conda/bin/jupyter server --notebook-dir=/home/${NB_USER} \ diff --git a/output/jupyterlab-pytorch/start-custom.sh b/output/jupyterlab-pytorch/start-custom.sh index 7e409509d..fbcde6b07 100755 --- a/output/jupyterlab-pytorch/start-custom.sh +++ b/output/jupyterlab-pytorch/start-custom.sh @@ -247,6 +247,25 @@ local({ EOF fi +# Check if the directory exists +if [ ! -d /home/$NB_USER/test ]; then + # Directory does not exist, create it + mkdir -p /home/$NB_USER/test + echo "Directory test created." +else + echo "Directory test already exists." +fi + +DIR="/home/$NB_USER/.gnupg" + +if [ -d "$DIR" ]; then + chmod 700 "$DIR" + echo "Permissions for $DIR set to 700." +else + echo "Directory $DIR does not exist." +fi + + echo "--------------------starting jupyter--------------------" /opt/conda/bin/jupyter server --notebook-dir=/home/${NB_USER} \ diff --git a/output/jupyterlab-tensorflow/start-custom.sh b/output/jupyterlab-tensorflow/start-custom.sh index 7e409509d..fbcde6b07 100755 --- a/output/jupyterlab-tensorflow/start-custom.sh +++ b/output/jupyterlab-tensorflow/start-custom.sh @@ -247,6 +247,25 @@ local({ EOF fi +# Check if the directory exists +if [ ! -d /home/$NB_USER/test ]; then + # Directory does not exist, create it + mkdir -p /home/$NB_USER/test + echo "Directory test created." +else + echo "Directory test already exists." +fi + +DIR="/home/$NB_USER/.gnupg" + +if [ -d "$DIR" ]; then + chmod 700 "$DIR" + echo "Permissions for $DIR set to 700." +else + echo "Directory $DIR does not exist." +fi + + echo "--------------------starting jupyter--------------------" /opt/conda/bin/jupyter server --notebook-dir=/home/${NB_USER} \ diff --git a/output/remote-desktop/start-custom.sh b/output/remote-desktop/start-custom.sh index 7e409509d..fbcde6b07 100755 --- a/output/remote-desktop/start-custom.sh +++ b/output/remote-desktop/start-custom.sh @@ -247,6 +247,25 @@ local({ EOF fi +# Check if the directory exists +if [ ! -d /home/$NB_USER/test ]; then + # Directory does not exist, create it + mkdir -p /home/$NB_USER/test + echo "Directory test created." +else + echo "Directory test already exists." +fi + +DIR="/home/$NB_USER/.gnupg" + +if [ -d "$DIR" ]; then + chmod 700 "$DIR" + echo "Permissions for $DIR set to 700." +else + echo "Directory $DIR does not exist." +fi + + echo "--------------------starting jupyter--------------------" /opt/conda/bin/jupyter server --notebook-dir=/home/${NB_USER} \ diff --git a/output/rstudio/start-custom.sh b/output/rstudio/start-custom.sh index 7e409509d..fbcde6b07 100755 --- a/output/rstudio/start-custom.sh +++ b/output/rstudio/start-custom.sh @@ -247,6 +247,25 @@ local({ EOF fi +# Check if the directory exists +if [ ! -d /home/$NB_USER/test ]; then + # Directory does not exist, create it + mkdir -p /home/$NB_USER/test + echo "Directory test created." +else + echo "Directory test already exists." +fi + +DIR="/home/$NB_USER/.gnupg" + +if [ -d "$DIR" ]; then + chmod 700 "$DIR" + echo "Permissions for $DIR set to 700." +else + echo "Directory $DIR does not exist." +fi + + echo "--------------------starting jupyter--------------------" /opt/conda/bin/jupyter server --notebook-dir=/home/${NB_USER} \ diff --git a/output/sas/start-custom.sh b/output/sas/start-custom.sh index 7e409509d..fbcde6b07 100755 --- a/output/sas/start-custom.sh +++ b/output/sas/start-custom.sh @@ -247,6 +247,25 @@ local({ EOF fi +# Check if the directory exists +if [ ! -d /home/$NB_USER/test ]; then + # Directory does not exist, create it + mkdir -p /home/$NB_USER/test + echo "Directory test created." +else + echo "Directory test already exists." +fi + +DIR="/home/$NB_USER/.gnupg" + +if [ -d "$DIR" ]; then + chmod 700 "$DIR" + echo "Permissions for $DIR set to 700." +else + echo "Directory $DIR does not exist." +fi + + echo "--------------------starting jupyter--------------------" /opt/conda/bin/jupyter server --notebook-dir=/home/${NB_USER} \ diff --git a/resources/common/start-custom.sh b/resources/common/start-custom.sh index 7e409509d..fbcde6b07 100755 --- a/resources/common/start-custom.sh +++ b/resources/common/start-custom.sh @@ -247,6 +247,25 @@ local({ EOF fi +# Check if the directory exists +if [ ! -d /home/$NB_USER/test ]; then + # Directory does not exist, create it + mkdir -p /home/$NB_USER/test + echo "Directory test created." +else + echo "Directory test already exists." +fi + +DIR="/home/$NB_USER/.gnupg" + +if [ -d "$DIR" ]; then + chmod 700 "$DIR" + echo "Permissions for $DIR set to 700." +else + echo "Directory $DIR does not exist." +fi + + echo "--------------------starting jupyter--------------------" /opt/conda/bin/jupyter server --notebook-dir=/home/${NB_USER} \