Skip to content

Commit

Permalink
Add a venv to fix build of QGIS master
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jan 10, 2025
1 parent 54b69ee commit a62a46a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/qgis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
if: failure()
- uses: actions/upload-artifact@v4
with:
name: Update dpkg versions list.patch
name: Update QGIS ${{ matrix.version }} dpkg versions list.patch
path: /tmp/dpkg-versions.patch
retention-days: 1
if: failure()
2 changes: 1 addition & 1 deletion ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
c2cciutils[checks,publish]==1.7.1
c2cciutils[checks,publish]==1.7.2
pre-commit==4.0.1
10 changes: 10 additions & 0 deletions docker/qgisserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,22 @@ LABEL maintainer Camptocamp "[email protected]"
# Print commands and their arguments as they are executed.
SHELL ["/bin/bash", "-o", "pipefail", "-cux"]

RUN --mount=type=cache,target=/var/lib/apt/lists \
--mount=type=cache,target=/var/cache,sharing=locked \
apt-get update \
&& apt-get upgrade --assume-yes \
&& apt-get install --assume-yes --no-install-recommends python3-venv \
&& python3 -m venv --system-site-packages /venv

ENV PATH=/venv/bin:$PATH

# Used to convert the locked packages by poetry to pip requirements format
# We don't directly use `poetry install` because it force to use a virtual environment.
FROM base-all AS poetry

# Install Poetry
WORKDIR /tmp

COPY requirements.txt ./
RUN --mount=type=cache,target=/root/.cache \
python3 -m pip install --disable-pip-version-check --requirement=requirements.txt
Expand Down

0 comments on commit a62a46a

Please sign in to comment.