Skip to content

Commit

Permalink
fix manual build (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmacata authored Dec 3, 2024
1 parent a76d126 commit 5798836
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions grass-gis-manual-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ FROM osgeo/grass-gis:releasebranch_8_4-alpine
ARG ADDON_NAME
ARG GITHUB_REPOSITORY

RUN apk add gcc make python3-dev musl-dev linux-headers

WORKDIR /src
COPY . /src

RUN apk add gcc make python3-dev musl-dev linux-headers

# create environment to install requirements
RUN python -m venv addon-env
RUN python -m venv --system-site-packages addon-env
ENV PATH="/src/addon-env/bin:$PATH"
# --system-site-packages only works for active virtual environment.
# To use paths, below hack is needed..
RUN export VERSION=$(python -c \
"import sys;print(f\"python{sys.version_info.major}.{sys.version_info.minor}\")"); \
echo "/usr/lib/$VERSION/site-packages/" > /src/addon-env/lib/$VERSION/site-packages/system-packages.pth
RUN test -e requirements.txt && pip3 install -r requirements.txt || echo "No requirements.txt"

# Compile GRASS GIS addon
Expand Down

0 comments on commit 5798836

Please sign in to comment.