Loading services/base/entrypoint.sh +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ fi #--------------------- if [ "x$SAFEMODE" == "xFalse" ]; then echo "[INFO] Executing prestartup scripts (current + parents):" echo "[INFO] Executing prestartup scripts (parents + current):" python /prestartup.py else echo "[INFO] Not executing prestartup scripts as we are in safemode" Loading services/base/prestartup.py +3 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,9 @@ def shell(command, interactive=False): prestartup_scripts_path='/prestartup' def sorted_ls(path): mtime = lambda f: os.stat(os.path.join(path, f)).st_mtime return list(sorted(os.listdir(path), key=mtime)) file_list = list(sorted(os.listdir(path), key=mtime)) file_list.reverse() return file_list for item in sorted_ls(prestartup_scripts_path): if item.endswith('.sh'): Loading services/slurmbase/Dockerfile +3 −0 Original line number Diff line number Diff line Loading @@ -28,3 +28,6 @@ RUN useradd slurmtestuser RUN mkdir -p /home/slurmtestuser/.ssh RUN cat /rosetta/.ssh/id_rsa.pub >> /home/slurmtestuser/.ssh/authorized_keys RUN chown -R slurmtestuser:slurmtestuser /home/slurmtestuser # Add prestartup COPY prestartup_slurmbase.sh /prestartup/ No newline at end of file services/slurmbase/prestartup_slurmbase.sh 0 → 100644 +8 −0 Original line number Diff line number Diff line #!/bin/bash set -e # "Deactivate" local slurmtestuser home mv /home/slurmtestuser /home_slurmtestuser_vanilla # Link slurmtestuser against the home in the shared folder (which will be setup by the master node) ln -s /shared/home_slurmtestuser /home/slurmtestuser services/slurmclustermaster/prestartup_slurmclustermaster.sh +4 −0 Original line number Diff line number Diff line #!/bin/bash set -e # Generic rosetta user shared folder mkdir -p /shared/rosetta && chown rosetta:rosetta /shared/rosetta # Shared home for slurmtestuser to simulate a shared home folders filesystem cp -a /home_slurmtestuser_vanilla /shared/home_slurmtestuser Loading
services/base/entrypoint.sh +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ fi #--------------------- if [ "x$SAFEMODE" == "xFalse" ]; then echo "[INFO] Executing prestartup scripts (current + parents):" echo "[INFO] Executing prestartup scripts (parents + current):" python /prestartup.py else echo "[INFO] Not executing prestartup scripts as we are in safemode" Loading
services/base/prestartup.py +3 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,9 @@ def shell(command, interactive=False): prestartup_scripts_path='/prestartup' def sorted_ls(path): mtime = lambda f: os.stat(os.path.join(path, f)).st_mtime return list(sorted(os.listdir(path), key=mtime)) file_list = list(sorted(os.listdir(path), key=mtime)) file_list.reverse() return file_list for item in sorted_ls(prestartup_scripts_path): if item.endswith('.sh'): Loading
services/slurmbase/Dockerfile +3 −0 Original line number Diff line number Diff line Loading @@ -28,3 +28,6 @@ RUN useradd slurmtestuser RUN mkdir -p /home/slurmtestuser/.ssh RUN cat /rosetta/.ssh/id_rsa.pub >> /home/slurmtestuser/.ssh/authorized_keys RUN chown -R slurmtestuser:slurmtestuser /home/slurmtestuser # Add prestartup COPY prestartup_slurmbase.sh /prestartup/ No newline at end of file
services/slurmbase/prestartup_slurmbase.sh 0 → 100644 +8 −0 Original line number Diff line number Diff line #!/bin/bash set -e # "Deactivate" local slurmtestuser home mv /home/slurmtestuser /home_slurmtestuser_vanilla # Link slurmtestuser against the home in the shared folder (which will be setup by the master node) ln -s /shared/home_slurmtestuser /home/slurmtestuser
services/slurmclustermaster/prestartup_slurmclustermaster.sh +4 −0 Original line number Diff line number Diff line #!/bin/bash set -e # Generic rosetta user shared folder mkdir -p /shared/rosetta && chown rosetta:rosetta /shared/rosetta # Shared home for slurmtestuser to simulate a shared home folders filesystem cp -a /home_slurmtestuser_vanilla /shared/home_slurmtestuser