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

Use Python 3.11 by default and venv instead of virtualenv #877

Merged
merged 9 commits into from
Aug 31, 2023
Merged

Conversation

bgruening
Copy link
Member

@bgruening bgruening commented Aug 29, 2023

Closes usegalaxy-eu/issues#465.

@kysrpex kysrpex changed the title use python 3.11 by default Use Python 3.11 by default and venv instead of virtualenv Aug 29, 2023
this is useful to not symlink to a NFS-stored version of python or the system version
@bgruening
Copy link
Member Author

Please take this one over, I will be on a bike soon.

@sanjaysrikakulam
Copy link
Member

Also, all the changes are to sn07 files and not sn06.

@kysrpex
Copy link
Contributor

kysrpex commented Aug 29, 2023

Also, all the changes are to sn07 files and not sn06.

Do you mean that the same changes should be applied to sn06's playbook and group vars or that this changeset is correct?

@sanjaysrikakulam
Copy link
Member

Also, all the changes are to sn07 files and not sn06.

Do you mean that the same changes should be applied to sn06's playbook and group vars or that this changeset is correct?

We do not have a sn07 host at the moment. Only sn06. Also, the changes @bgruening made and suggested were concerning to sn06. Though the changes made to sn07 now are useful (keep things synced), they will not change or implement @bgruening's plan for sn06. Maybe that will come in a separate PR?

@kysrpex
Copy link
Contributor

kysrpex commented Aug 29, 2023

Also, all the changes are to sn07 files and not sn06.

Do you mean that the same changes should be applied to sn06's playbook and group vars or that this changeset is correct?

We do not have a sn07 host at the moment. Only sn06. Also, the changes @bgruening made and suggested were concerning to sn06. Though the changes made to sn07 now are useful (keep things synced), they will not change or implement @bgruening's plan for sn06. Maybe that will come in a separate PR?

Sorry I was thinking somehow of the maintenance node as sn07 (obviously wrong) 😅 Now it is clear.

Though the changes made to sn07 now are useful (keep things synced)

In the end what would make better sense is to define a servers group (e.g. "headnodes") and move most of the group vars currently defined for sn06 to such group.

@bgruening
Copy link
Member Author

I could not find those variables in sn06. Sorry.

kysrpex and others added 2 commits August 29, 2023 11:47
This will tell the miniconda role where to install
@sanjaysrikakulam
Copy link
Member

sanjaysrikakulam commented Aug 29, 2023

I have added the missing variable now.

Notes
tiaas_virtualenv_python variable in sn06 and sn07 group_vars files is not required in latest version of the role (See here). So we can remove this variable when we migrate to the latest version of the TIaaS2 ansible role.

@bgruening's migration plan:

  1. turn down handlers
  2. mv /opt/galaxy/venv /opt/galaxy/venv39
  3. recreate a new venv like above
  4. run the playbook
  5. sync to NFS for celery and others
  6. turn down the manually started gunicorn

Updated plan:

  1. turn down handlers
  2. mv /opt/galaxy/venv /opt/galaxy/venv38
  3. Merge this PR and run the playbook
  4. sync to NFS for celery and others
  5. turn down the manually started gunicorn and remove the venv311 and the gunicorn socket along with the systemd file (if created)

The changes will now use the miniconda role and create a miniconda directory in /opt/ where a _galaxy_ conda env with python 3.11 will be created. Python from this conda env will then create venv for Galaxy. Galaxy's venv will be created in /opt/galaxy/venv.

Copy link
Member

@sanjaysrikakulam sanjaysrikakulam left a comment

Choose a reason for hiding this comment

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

It should work. Please merge this banner update PR and then this PR. Make sure to change the name of the existing venv directory to venv38 before running and deploying this playbook.

@bgruening
Copy link
Member Author

I had workshops to do this morning and many questions, so will do it tomorrow morning, your midnight.

@sanjaysrikakulam
Copy link
Member

@bgruening, tensorflow==2.9.3 is not available for Python 3.11. The conditional dependency should be updated to tensorflow==2.12.0. However, I am unsure whether the tool recommendation tool would work with tensorflow==2.12.0 version. This is the 1st version (latest version is 2.13.0) of Tensorflow that supports Python 3.11.

@bgruening
Copy link
Member Author

Ok I will keep an eye on it. I guess we would deactivate it if it's not working and ask Anyp to look at it.

@bgruening
Copy link
Member Author

And let's go!

@bgruening bgruening merged commit 80de267 into master Aug 31, 2023
@bgruening bgruening deleted the 311 branch August 31, 2023 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants