Skip to content

Commit

Permalink
fix: install compilation dependency for numexpr (#109)
Browse files Browse the repository at this point in the history
* Update Dockerfile to compile numexpr


Co-authored-by: Branson Fox <[email protected]>
  • Loading branch information
hrodmn and bransonf authored Aug 20, 2024
1 parent 7536c55 commit 2762944
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/conventional-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- name: Get Release Bot Token
id: get-token
uses: getsentry/action-github-app-token@v1
uses: getsentry/action-github-app-token@v3
with:
app_id: ${{ secrets.DS_RELEASE_BOT_ID }}
private_key: ${{ secrets.DS_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
6 changes: 6 additions & 0 deletions lib/titiler-pgstac-api/runtime/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ FROM --platform=linux/amd64 public.ecr.aws/lambda/python:${PYTHON_VERSION}
WORKDIR /tmp
RUN python -m pip install pip -U

# Install system dependencies to compile (numexpr)
RUN yum install -y gcc-c++

COPY runtime/requirements.txt requirements.txt
RUN python -m pip install -r requirements.txt "mangum>=0.14,<0.15" -t /asset

# Remove system dependencies
RUN yum remove -y gcc-c++

# Reduce package size and remove useless files
RUN find /asset -type f -name '*.pyc' | while read f; do n=$(echo $f | sed 's/__pycache__\///' | sed 's/.cpython-[0-9]*//'); cp $f $n; done;
RUN find /asset -type d -name '__pycache__' -print0 | xargs -0 rm -rf
Expand Down

0 comments on commit 2762944

Please sign in to comment.