Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update base image to python-3.11.3 #455

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

Update base image to python-3.11.3 #455

wants to merge 28 commits into from

Conversation

danielhollas
Copy link
Contributor

@danielhollas danielhollas commented May 14, 2024

Closes #265

NOTE: Upgrading Python is a breaking change since the python dependencies of installed AiiDAlab Apps need to be reinstalled due, see #317

@danielhollas danielhollas added the blocked This issue/PR is blocked by another issue/PR. label Jun 21, 2024
@danielhollas
Copy link
Contributor Author

Blocked on aiidalab/aiidalab#428

@unkcpz
Copy link
Member

unkcpz commented Jun 21, 2024

Hi @danielhollas, I reconsidered if use jupyter stack as the base image is a good option, instead if we move to using aiida-core images could gaining more flexibility. Major two reasons are:

  1. The jupyter/minimal-notebook we use now as you did in this PR, we using python version tag, therefore has no control on the notebook version. If fact the python version is not we really care but mostly the aiida-core version and jupyter backend version.
  2. We cannot set the system username which is minor but still not so good. Plus we can not using s6-overlay which I think manage well for the services when we need more.

Let me know your opinion.

stack/base/Dockerfile Outdated Show resolved Hide resolved
@danielhollas
Copy link
Contributor Author

Blocked on aiidalab/aiidalab#429

@unkcpz I've created #471, we shouldn't be discussing these foundational thing in PRs.

@unkcpz
Copy link
Member

unkcpz commented Jun 22, 2024 via email

@danielhollas
Copy link
Contributor Author

Yeah, if you want to start to play with NB7, you can start with this PR and set python=3.11.4 which is the first version with v7.

@danielhollas danielhollas changed the title Update base image to python-3.10.11 Update base image to python-3.11.3 Jun 22, 2024
@danielhollas danielhollas removed the blocked This issue/PR is blocked by another issue/PR. label Jul 14, 2024
mamba install --yes \
aiida-core==${AIIDA_VERSION} \
mamba-bash-completion \
traitlets=5.9.0 \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base image already comes with traitlets==5.9.0

@danielhollas danielhollas marked this pull request as ready for review September 8, 2024 13:36
@danielhollas
Copy link
Contributor Author

This is now ready for review and testing. I don't want to merge yet, since we should deploy this change together with #483 and #482 so that we bundle all possibly breaking changes in single release.

Copy link
Member

@yakutovicha yakutovicha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @danielhollas. I just tried to run the container on my laptop, but it failed. My aiidalab-launch config looks as follows:

port = 8892
default_apps = []
system_user = "jovyan"
image = "ghcr.io/aiidalab/full-stack:pr-455"
home_mount = "aiidalab_test-python-311_home"
extra_mounts = []

Here is the log containing the error:

...


+ _log '/usr/local/bin/start.sh: running script /usr/local/bin/before-notebook.d/20_start-postgresql.sh'
+ [[ /usr/local/bin/start.sh: running script /usr/local/bin/before-notebook.d/20_start-postgresql.sh == \E\R\R\O\R\:* ]]
+ [[ /usr/local/bin/start.sh: running script /usr/local/bin/before-notebook.d/20_start-postgresql.sh == \W\A\R\N\I\N\G\:* ]]
+ [[ '' == '' ]]
+ echo '/usr/local/bin/start.sh: running script /usr/local/bin/before-notebook.d/20_start-postgresql.sh'
+ source /usr/local/bin/before-notebook.d/20_start-postgresql.sh
/usr/local/bin/start.sh: running script /usr/local/bin/before-notebook.d/20_start-postgresql.sh
++ set -x
++ [[ -z /home/jovyan/.postgresql ]]
++ PSQL_LOGFILE=/home/jovyan/.postgresql/logfile
++ PSQL_START_CMD='pg_ctl --timeout=180 -w -l /home/jovyan/.postgresql/logfile start'
++ MAMBA_RUN='mamba run -n aiida-core-services'
++ [[ ! -d /home/jovyan/.postgresql ]]
++ chmod -R g-rwxs /home/jovyan/.postgresql
++ [[ -f /home/jovyan/.postgresql/logfile ]]
++ rm -f /home/jovyan/.postgresql/logfile.1.gz
++ mv /home/jovyan/.postgresql/logfile /home/jovyan/.postgresql/logfile.1
++ gzip /home/jovyan/.postgresql/logfile.1
++ rm -vf /home/jovyan/.postgresql/postmaster.pid
removed '/home/jovyan/.postgresql/postmaster.pid'
++ mamba run -n aiida-core-services pg_ctl --timeout=180 -w -l /home/jovyan/.postgresql/logfile start
pg_ctl: could not start server
Examine the log output.

ERROR conda.cli.main_run:execute(125): `conda run pg_ctl --timeout=180 -w -l /home/jovyan/.postgresql/logfile start` failed. (See above for error)
waiting for server to start.... stopped waiting

For your information: I have ARM architecture, but I doubt it is related.

@danielhollas
Copy link
Contributor Author

@yakutovicha strange, it works for me. Have you pulled the latest version of the image? Can you dig up the postgres logs to see why it is failing?

@danielhollas
Copy link
Contributor Author

I just enabled the arm tests on this branch and they all passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Python 3.11
3 participants