You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the first time start the container, it takes at least 1 minute to prepare everything needed to start the platform.
Those consist of:
(✅) Initialize the psql database into user home.
(✅) Initialize AiiDA profile in the user home.
(✅) create localhost as a default computer.
(✅) Reset the RMQ configure path and config for infinite consumer timeout.
Reset (if triggered) the user's home folder.
(✅) Install aiidalab-home
pre-install the apps if set.
start the AiiDA daemon.
Items tagged with ✅ in the list are things that need to be done for every user. Thus they can be hardcoded in the Dockerfile and run in the image build phase. The reason that we can not put them in Dockerfile is that the consequence of these procedures are modifying user's home folder which potentially will be mapped to the persistent volume for long term data storage.
For the docker, it has the mechanism that if the volume is empty the data will be copied from image to the volume the first time container start. But for the jupyterhub it is not the case. That is to say Docker image’s $HOME directory will be hidden from the user. To make these contents visible to the user, we must pre-populate the user’s filesystem. The method is provided with new JupyterHub and can be found at https://z2jh.jupyter.org/en/3.2.1/jupyterhub/customizing/user-environment.html#about-user-storage-and-adding-files-to-it (but be careful that poststart hook will not work since it will happen after the start of container, instead need to archive the home folder and populate it as the first "before-notebook" task after the container start).
Impact
This will greatly reduce the first-start time of the container from minutes to seconds.
The text was updated successfully, but these errors were encountered:
Background
When the first time start the container, it takes at least 1 minute to prepare everything needed to start the platform.
Those consist of:
aiidalab-home
Items tagged with
✅
in the list are things that need to be done for every user. Thus they can be hardcoded in the Dockerfile and run in the image build phase. The reason that we can not put them in Dockerfile is that the consequence of these procedures are modifying user's home folder which potentially will be mapped to the persistent volume for long term data storage.For the docker, it has the mechanism that if the volume is empty the data will be copied from image to the volume the first time container start. But for the jupyterhub it is not the case. That is to say Docker image’s $HOME directory will be hidden from the user. To make these contents visible to the user, we must pre-populate the user’s filesystem. The method is provided with new JupyterHub and can be found at https://z2jh.jupyter.org/en/3.2.1/jupyterhub/customizing/user-environment.html#about-user-storage-and-adding-files-to-it (but be careful that poststart hook will not work since it will happen after the start of container, instead need to archive the home folder and populate it as the first "before-notebook" task after the container start).
Impact
This will greatly reduce the first-start time of the container from minutes to seconds.
The text was updated successfully, but these errors were encountered: