Skip to content

Commit

Permalink
Fix Docker image builds by using non-package mode for initial depende…
Browse files Browse the repository at this point in the history
…ncies installation (#828)

* Install dependencies in non-package mode
* Pin Poetry to ~=2.0
  • Loading branch information
juhoinkinen authored Jan 20, 2025
1 parent 8f13d7d commit 736353f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ RUN apt-get update && apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/* /usr/include/*

WORKDIR /Annif
RUN pip install --upgrade pip poetry --no-cache-dir && \
pip install poetry
RUN pip install --upgrade pip "poetry~=2.0" --no-cache-dir

COPY pyproject.toml setup.cfg README.md LICENSE.txt CITATION.cff projects.cfg.dist /Annif/

# First round of installation for Docker layer caching:
RUN echo "Installing dependencies for optional features: $optional_dependencies" \
&& poetry install -E "$optional_dependencies" \
&& poetry install -E "$optional_dependencies" --no-root \
&& rm -rf /root/.cache/pypoetry # No need for cache because of poetry.lock

# Download nltk data
Expand Down

0 comments on commit 736353f

Please sign in to comment.