Skip to content

Commit

Permalink
use flag file .FLAG_HOME_INITIALIZED
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Sep 20, 2024
1 parent d03ce60 commit 0fc301d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ RUN --mount=from=qe_conda_env,source=${QE_DIR},target=${QE_DIR} \
bash /usr/local/bin/before-notebook.d/42_setup-hq-computer.sh && \
python -m aiidalab_qe install-qe --computer ${HQ_COMPUTER} && \
python -m aiidalab_qe install-pseudos --source ${PSEUDO_FOLDER} && \
touch /home/${NB_USER}/work/.placeholder && \
verdi daemon stop && \
mamba run -n aiida-core-services pg_ctl stop && \
# touch /home/${NB_USER}/.FLAG_HOME_INITIALIZED && \
touch /home/${NB_USER}/.FLAG_HOME_INITIALIZED && \
cd /home/${NB_USER} && tar -cf /opt/conda/home.tar .

# STAGE 3 - Final stage
Expand Down
2 changes: 1 addition & 1 deletion before-notebook.d/00_untar-home.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eux
home="/home/${NB_USER}"

# Untar home archive file to restore home directory if it is empty
if [[ $(ls -A ${home} | wc -l) -le 1 ]]; then
if [ ! -e $home/.FLAG_HOME_INITIALIZED ]; then
if [[ ! -f $HOME_TAR ]]; then
echo "File $HOME_TAR does not exist!"
exit 1
Expand Down

0 comments on commit 0fc301d

Please sign in to comment.