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

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

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).

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
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.

1 participant