diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs deleted file mode 100644 index c4939f72..00000000 --- a/.git-blame-ignore-revs +++ /dev/null @@ -1,2 +0,0 @@ -# Migrade code style to black and fix of some other linting issues. -2dc64eeb0082e4dc849d5baaf7a8fbfcf3e5cb15 diff --git a/.local/postgres.sh b/.local/postgres.sh deleted file mode 100644 index 0f4aa800..00000000 --- a/.local/postgres.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -PGBIN=/usr/lib/postgresql/10/bin - -# -w waits until server is up -PSQL_START_CMD="${PGBIN}/pg_ctl --timeout=180 -w -D ${AIIDALAB_HOME}/.postgresql -l ${AIIDALAB_HOME}/.postgresql/logfile start" -PSQL_STOP_CMD="${PGBIN}/pg_ctl -w -D ${AIIDALAB_HOME}/.postgresql stop" -PSQL_STATUS_CMD="${PGBIN}/pg_ctl -D ${AIIDALAB_HOME}/.postgresql status" - -# helper function to start psql and wait for it -#TIMEOUT=20 -#until psql -h localhost template1 -c ";" || [ $TIMEOUT -eq 0 ]; do -# echo ">>>>>>>>> Waiting for postgres server, $((TIMEOUT--)) remaining attempts..." -# tail -n 50 ${AIIDALAB_HOME}/.postgresql/logfile -# sleep 1 -#done - -function psql_start { - # make DB directory, if not existent - if [ ! -d ${AIIDALAB_HOME}/.postgresql ]; then - mkdir ${AIIDALAB_HOME}/.postgresql - ${PGBIN}/initdb -D ${AIIDALAB_HOME}/.postgresql - echo "unix_socket_directories = '${AIIDALAB_HOME}/.postgresql'" >> ${AIIDALAB_HOME}/.postgresql/postgresql.conf - ${PSQL_START_CMD} - psql -h localhost -d template1 -c "CREATE USER aiida WITH PASSWORD 'aiida_db_passwd';" - psql -h localhost -d template1 -c "CREATE DATABASE aiidadb OWNER aiida;" - psql -h localhost -d template1 -c "GRANT ALL PRIVILEGES ON DATABASE aiidadb to aiida;" - - # else don't - else - - # stores return value in $? - running=true - ${PSQL_STATUS_CMD} || running=false - - # Postgresql was probably not shutdown properly. Cleaning up the mess... - if ! $running ; then - echo "" > ${AIIDALAB_HOME}/.postgresql/logfile # empty log files - rm -vf ${AIIDALAB_HOME}/.postgresql/.s.PGSQL.5432 - rm -vf ${AIIDALAB_HOME}/.postgresql/.s.PGSQL.5432.lock - rm -vf ${AIIDALAB_HOME}/.postgresql/postmaster.pid - ${PSQL_START_CMD} - fi - fi -} - -function psql_stop { - $PSQL_STOP_CMD -} diff --git a/.local/start-singleuser.sh b/.local/start-singleuser.sh deleted file mode 100644 index 9a290f23..00000000 --- a/.local/start-singleuser.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash -e -# This script is executed whenever the docker container is (re)started. - -#=============================================================================== -# set aiidalab variables -export AIIDALAB_HOME=$HOME -export AIIDALAB_APPS=$HOME/apps -export AIIDALAB_SCRIPTS=${HOME}/.local - -#=============================================================================== -# debugging -set -x - -#=============================================================================== -# start postgresql -source ${AIIDALAB_SCRIPTS}/postgres.sh -psql_start - -#=============================================================================== -# environment -export PYTHONPATH=${AIIDALAB_HOME} -export SHELL=/bin/bash - -jupyter nbextension install --py --sys-prefix fileupload -jupyter nbextension enable --py --sys-prefix fileupload -#=============================================================================== -# setup AiiDA -aiida_backend=django - -if [ ! -d ${AIIDALAB_HOME}/.aiida ]; then - verdi setup \ - --non-interactive \ - --email some.body@xyz.com \ - --first-name Some \ - --last-name Body \ - --institution XYZ \ - --backend $aiida_backend \ - --db_user aiida \ - --db_pass aiida_db_passwd \ - --db_name aiidadb \ - --db_host localhost \ - --db_port 5432 \ - --repo ${AIIDALAB_HOME}/.aiida/repository-default \ - default - - verdi profile setdefault verdi default - verdi profile setdefault daemon default - bash -c 'echo -e "y\nsome.body@xyz.com" | verdi daemon configureuser' - - # increase logging level - #verdi devel setproperty logging.celery_loglevel DEBUG - #verdi devel setproperty logging.aiida_loglevel DEBUG - - # start the daemon verdi daemon start - -else - if [ $aiida_backend = "django" ]; then - verdi daemon stop || true - echo "yes" | python /srv/conda/envs/kernel/lib/python2.7/site-packages/aiida/backends/djsite/manage.py --aiida-profile=default migrate - verdi daemon start - fi -fi - -#=============================================================================== -# setup AiiDA jupyter extension -if [ ! -e ${AIIDALAB_HOME}/.ipython/profile_default/ipython_config.py ]; then - mkdir -p ${AIIDALAB_HOME}/.ipython/profile_default/ - echo > ${AIIDALAB_HOME}/.ipython/profile_default/ipython_config.py <> ${AIIDALAB_HOME}/.bashrc - echo 'export PYTHONPATH="${AIIDALAB_HOME}"' >> ${AIIDALAB_HOME}/.bashrc -fi - -# update the list of installed plugins -grep "reentry scan" ${AIIDALAB_HOME}/.bashrc || echo "reentry scan" >> ${AIIDALAB_HOME}/.bashrc - -#=============================================================================== -# install/upgrade apps -if [ ! -e ${AIIDALAB_APPS} ]; then - mkdir ${AIIDALAB_APPS} - touch ${AIIDALAB_APPS}/__init__.py - git clone https://github.com/materialscloud-org/mc-home ${AIIDALAB_APPS}/home -# git clone https://github.com/aiidalab/aiidalab-widgets-base.git ${AIIDALAB_APPS}/aiidalab-widgets-base - -fi - -# setup localhost and codes - -compname=localhost -codename=pw -codeplugin=quantumespresso.pw -codexec=pw.x -codepath=`which $codexec` - -verdi computer show ${compname} || ( echo "${compname} -localhost -this computer -True -local -direct -#!/bin/bash -/home/{username}/aiida_run/ -mpirun -np {tot_num_mpiprocs} -1" | verdi computer setup && verdi computer configure ${compname} ) - -# Quantum Espresso -verdi code show ${codename}@${compname} || echo "${codename} -pw.x on this computer -False -${codeplugin} -${compname} -${codepath}" | verdi code setup - -# import pseudo family for QE -base_url=http://archive.materialscloud.org/file/2018.0001/v1 -pseudo_name=SSSP_efficiency_pseudos -wget ${base_url}/${pseudo_name}.aiida -verdi import ${pseudo_name}.aiida - -##EOF diff --git a/apt.txt b/apt.txt deleted file mode 100644 index e8b32d9e..00000000 --- a/apt.txt +++ /dev/null @@ -1,4 +0,0 @@ -graphviz -postgresql -quantum-espresso -vim diff --git a/jupyter-config/jupyter_notebook_config.d/aiidalab.json b/jupyter-config/jupyter_notebook_config.d/aiidalab.json deleted file mode 100644 index 30945d32..00000000 --- a/jupyter-config/jupyter_notebook_config.d/aiidalab.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "NotebookApp": { - "nbserver_extensions": { - "appmode.server_extension": true - } - } -} diff --git a/jupyter-config/nbconfig/notebook.d/aiidalab.json b/jupyter-config/nbconfig/notebook.d/aiidalab.json deleted file mode 100644 index 67621933..00000000 --- a/jupyter-config/nbconfig/notebook.d/aiidalab.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "load_extensions": { - "bqplot/extension": true, - "jupyter-js-widgets/extension": true, - "jupyter-matplotlib/extension": true, - "nglview-js-widgets/extension": true, - "appmode/main": true, - "jupyter-threejs/extension": true, - "fileupload/extension": true - } -} diff --git a/parameters/bands.yaml b/parameters/bands.yaml deleted file mode 100644 index 787380a8..00000000 --- a/parameters/bands.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -SYSTEM: - ecutwfc: 50.0 - ecutrho: 200.0 diff --git a/parameters/relax.yaml b/parameters/relax.yaml deleted file mode 100644 index cdaa2dc7..00000000 --- a/parameters/relax.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -CONTROL: - calculation: vc-relax -SYSTEM: - ecutwfc: 50.0 - ecutrho: 200.0 diff --git a/postBuild b/postBuild deleted file mode 100644 index a65133ca..00000000 --- a/postBuild +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -#jupyter nbextension enable --py --sys-prefix appmode -#jupyter serverextension enable --py --sys-prefix appmode -#jupyter nbextension install --py --sys-prefix fileupload -#jupyter nbextension enable --py --sys-prefix fileupload -reentry scan - -# set up AiiDA profile -source .local/start-singleuser.sh - -echo "source activate kernel" >> ${AIIDA_HOME}/.bashrc - -# make aiida demos discoverable by home app -ln -s ${AIIDALAB_HOME} ${AIIDALAB_APPS}/aiida_demos - -# stop postgres properly (makes restart faster) -psql_stop diff --git a/post_install b/post_install index aba184d6..5a251b0e 100755 --- a/post_install +++ b/post_install @@ -1,5 +1,8 @@ #!/bin/bash +# This script is executed after the app installation completes +# triggered by the post install hook implemented in https://github.com/aiidalab/aiidalab/pull/295 + echo "Starting installation of QE..." python -m aiidalab_qe install-qe & disown diff --git a/start b/start deleted file mode 100644 index a5a4274e..00000000 --- a/start +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -set -ex - -# this also sets environment variables -source activate kernel -source .local/start-singleuser.sh - -exec "$@"