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

Fix Docker image builds by using non-package mode for initial dependencies installation #828

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

juhoinkinen
Copy link
Member

@juhoinkinen juhoinkinen commented Jan 18, 2025

Poetry 2.0 was released 2 weeks ago, and Annif installation with it in Docker image builds fail, see e.g. this CICD run .

The error message is just failed to solve: ... when installing optional dependencies, but in this comment it is stated that with Poetry 2.0 all the source code is needed to exist when running poetry install, not just pyproject.toml etc. files.

How about just pinning Poetry to version ~=1.8 in Dockerfile for now? (Poetry has already been pinned in CICD pipeline.)

Edit: There is --no-root option to poetry install for installing only dependencies from pyproject.toml, and when using it the source is not needed as with Poetry v1. So, lets us it, but also pin Poetry to ~=2.0.

Copy link

codecov bot commented Jan 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.63%. Comparing base (8f13d7d) to head (2998e24).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #828   +/-   ##
=======================================
  Coverage   99.63%   99.63%           
=======================================
  Files          95       95           
  Lines        7171     7171           
=======================================
  Hits         7145     7145           
  Misses         26       26           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juhoinkinen juhoinkinen changed the title Fix Docker image builds by using Poetry version 1 Fix Docker image builds by using non-package mode for initial dependencies installation Jan 18, 2025
Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

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

lgtm

@juhoinkinen juhoinkinen merged commit 736353f into main Jan 20, 2025
16 of 17 checks passed
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.

2 participants