Skip to content

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

Merged
juhoinkinen merged 2 commits into
mainfrom
fix-docker-builds-pin-to-poetry-v1
Jan 20, 2025
Merged

Fix Docker image builds by using non-package mode for initial dependencies installation#828
juhoinkinen merged 2 commits into
mainfrom
fix-docker-builds-pin-to-poetry-v1

Conversation

@juhoinkinen

@juhoinkinen juhoinkinen commented Jan 18, 2025

Copy link
Copy Markdown
Member

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.

@codecov

codecov Bot commented Jan 18, 2025

Copy link
Copy Markdown

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.

@sonarqubecloud

Copy link
Copy Markdown

@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

@osma osma left a comment

Copy link
Copy Markdown
Member

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
@osma osma added this to the 1.3 milestone Feb 3, 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.

2 participants