Skip to content

Commit

Permalink
Dealing with pyproj build problems and trying to use GHA cache
Browse files Browse the repository at this point in the history
More info:
pyproj4/pyproj#1322
pyproj4/pyproj#1321
Only unreleased main branch of pyproj has fix that works with cython3
  • Loading branch information
alexandru-m-g committed Jul 25, 2023
1 parent 0d29aca commit c592890
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- name: Checkout code
id: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Tag Info
id: tag_info
Expand All @@ -36,6 +36,8 @@ jobs:
aws-secret-access-key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Public ECR
uses: docker/login-action@v2
with:
Expand All @@ -50,3 +52,5 @@ jobs:
with:
push: true
tags: public.ecr.aws/unocha/hdx-jp-sw-pcode:${{ steps.tag_info.outputs.IMAGE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ COPY . .

RUN apk add --no-cache git g++ gfortran proj-util && \
apk add --no-cache --virtual .build-deps python3-dev proj-dev geos-dev musl-dev gdal-dev && \
pip3 install -r requirements.txt
pip3 install -r initial-requirements.txt
RUN pip3 install -r requirements.txt

ENTRYPOINT [ "python3", "run.py" ]
# ENTRYPOINT [ "tail", "-f", "/dev/null" ]
7 changes: 7 additions & 0 deletions initial-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Dependecy bug fixes
git+https://github.com/alexandru-m-g/pyproj-cython-bugfix.git@main

geopandas~=0.12.2
Fiona~=1.9.1
pandas~=1.5.3
Shapely~=2.0.1
5 changes: 1 addition & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
-r initial-requirements.txt
hdx-python-api~=5.9.7
geopandas~=0.12.2
Fiona~=1.9.1
pandas~=1.5.3
Shapely~=2.0.1
requests~=2.28.0
python-json-logger~=2.0.7
git+https://github.com/OCHA-DAP/hdx-redis-lib.git@0.2.3

0 comments on commit c592890

Please sign in to comment.