Skip to content

Commit

Permalink
fix: correctly install mesa-gl for arm (#3647)
Browse files Browse the repository at this point in the history
### Summary

Fixes the `arm64` image builds, which will be available again starting
in version `0.15.13`. A fix was implemented upstream in
Unstructured-IO/base-images#47 and a workaround
that installed `x86` packages in the `unstructured` repo was removed.

### Testing

See [this
job](https://github.com/Unstructured-IO/unstructured/actions/runs/10948943594/job/30401108059?pr=3647)
for a successful `arm64` build on the feature branch.
  • Loading branch information
MthwRobinson authored Sep 20, 2024
1 parent 0ed69a1 commit 7d66a23
Show file tree
Hide file tree
Showing 36 changed files with 198 additions and 156 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 0.15.13-dev3
## 0.15.13

### Enhancements

Expand All @@ -9,6 +9,7 @@
### Fixes

* **Fixes high memory overhead for intersection area computation** Using `numpy.float32` for coordinates and remove intermediate variables to reduce memory usage when computing intersection areas
* **Fixes the `arm64` image build** `arm64` builds are now fixed and will be available against starting with the `0.15.13` release.

## 0.15.12

Expand Down
11 changes: 0 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ COPY unstructured unstructured
COPY test_unstructured test_unstructured
COPY example-docs example-docs

# NOTE(robinson) - temporary workaround to install mesa-gl 24.1.0 because
# libgallum is missing in mesa-gl 24.2.0 from the wolfi package manager
RUN wget "https://utic-public-cf.s3.amazonaws.com/mesa-gl-24.1.0-r0.718c913d.apk" && \
wget "https://utic-public-cf.s3.amazonaws.com/mesa-glapi-24.1.0-r0.4390a503.apk" && \
apk del mesa-gl && \
apk add --allow-untrusted mesa-gl-24.1.0-r0.718c913d.apk && \
apk add --allow-untrusted mesa-glapi-24.1.0-r0.4390a503.apk && \
rm mesa-gl-24.1.0-r0.718c913d.apk && \
rm mesa-glapi-24.1.0-r0.4390a503.apk


RUN chown -R notebook-user:notebook-user /app && \
apk add font-ubuntu git && \
fc-cache -fv && \
Expand Down
14 changes: 10 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile ./base.in
#
anyio==4.4.0
anyio==4.5.0
# via httpx
backoff==2.2.1
# via -r ./base.in
Expand All @@ -16,6 +16,8 @@ certifi==2024.8.30
# httpx
# requests
# unstructured-client
cffi==1.17.1
# via cryptography
chardet==5.2.0
# via -r ./base.in
charset-normalizer==3.3.2
Expand All @@ -26,13 +28,15 @@ click==8.1.7
# via
# nltk
# python-oxmsg
cryptography==43.0.1
# via unstructured-client
dataclasses-json==0.6.7
# via
# -r ./base.in
# unstructured-client
deepdiff==8.0.1
# via unstructured-client
emoji==2.12.1
emoji==2.13.0
# via -r ./base.in
exceptiongroup==1.2.2
# via anyio
Expand Down Expand Up @@ -82,7 +86,9 @@ packaging==24.1
# unstructured-client
psutil==6.0.0
# via -r ./base.in
pypdf==4.3.1
pycparser==2.22
# via cffi
pypdf==5.0.0
# via unstructured-client
python-dateutil==2.9.0.post0
# via unstructured-client
Expand Down Expand Up @@ -133,7 +139,7 @@ typing-inspect==0.9.0
# via
# dataclasses-json
# unstructured-client
unstructured-client==0.25.8
unstructured-client==0.25.9
# via -r ./base.in
urllib3==1.26.20
# via
Expand Down
6 changes: 3 additions & 3 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ click==8.1.7
# pip-tools
distlib==0.3.8
# via virtualenv
filelock==3.16.0
filelock==3.16.1
# via virtualenv
identify==2.6.1
# via pre-commit
Expand All @@ -32,7 +32,7 @@ packaging==24.1
# build
pip-tools==7.4.1
# via -r ./dev.in
platformdirs==4.3.3
platformdirs==4.3.6
# via
# -c ./test.txt
# virtualenv
Expand All @@ -51,7 +51,7 @@ tomli==2.0.1
# -c ./test.txt
# build
# pip-tools
virtualenv==20.26.4
virtualenv==20.26.5
# via pre-commit
wheel==0.44.0
# via pip-tools
Expand Down
4 changes: 2 additions & 2 deletions requirements/extra-paddleocr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile ./extra-paddleocr.in
#
anyio==4.4.0
anyio==4.5.0
# via
# -c ./base.txt
# httpx
Expand Down Expand Up @@ -113,7 +113,7 @@ pillow==10.4.0
# pdf2image
# scikit-image
# unstructured-paddleocr
protobuf==4.25.4
protobuf==4.25.5
# via
# -c ././deps/constraints.txt
# paddlepaddle
Expand Down
26 changes: 16 additions & 10 deletions requirements/extra-pdf-image.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ certifi==2024.8.30
# -c ./base.txt
# requests
cffi==1.17.1
# via cryptography
# via
# -c ./base.txt
# cryptography
charset-normalizer==3.3.2
# via
# -c ./base.txt
Expand All @@ -24,14 +26,16 @@ coloredlogs==15.0.1
contourpy==1.3.0
# via matplotlib
cryptography==43.0.1
# via pdfminer-six
# via
# -c ./base.txt
# pdfminer-six
cycler==0.12.1
# via matplotlib
deprecated==1.2.14
# via pikepdf
effdet==0.4.1
# via -r ./extra-pdf-image.in
filelock==3.16.0
filelock==3.16.1
# via
# huggingface-hub
# torch
Expand All @@ -44,9 +48,9 @@ fsspec==2024.9.0
# via
# huggingface-hub
# torch
google-api-core[grpc]==2.19.2
google-api-core[grpc]==2.20.0
# via google-cloud-vision
google-auth==2.34.0
google-auth==2.35.0
# via
# google-api-core
# google-cloud-vision
Expand All @@ -63,7 +67,7 @@ grpcio==1.66.1
# grpcio-status
grpcio-status==1.62.3
# via google-api-core
huggingface-hub==0.24.7
huggingface-hub==0.25.0
# via
# timm
# tokenizers
Expand Down Expand Up @@ -166,7 +170,7 @@ proto-plus==1.24.0
# via
# google-api-core
# google-cloud-vision
protobuf==4.25.4
protobuf==4.25.5
# via
# -c ././deps/constraints.txt
# google-api-core
Expand All @@ -185,10 +189,12 @@ pyasn1-modules==0.4.1
pycocotools==2.0.8
# via effdet
pycparser==2.22
# via cffi
# via
# -c ./base.txt
# cffi
pyparsing==3.1.4
# via matplotlib
pypdf==4.3.1
pypdf==5.0.0
# via
# -c ./base.txt
# -r ./extra-pdf-image.in
Expand Down Expand Up @@ -236,7 +242,7 @@ six==1.16.0
# via
# -c ./base.txt
# python-dateutil
sympy==1.13.2
sympy==1.13.3
# via
# onnxruntime
# torch
Expand Down
6 changes: 3 additions & 3 deletions requirements/huggingface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ click==8.1.7
# via
# -c ./base.txt
# sacremoses
filelock==3.16.0
filelock==3.16.1
# via
# huggingface-hub
# torch
Expand All @@ -25,7 +25,7 @@ fsspec==2024.9.0
# via
# huggingface-hub
# torch
huggingface-hub==0.24.7
huggingface-hub==0.25.0
# via
# tokenizers
# transformers
Expand Down Expand Up @@ -82,7 +82,7 @@ six==1.16.0
# via
# -c ./base.txt
# langdetect
sympy==1.13.2
sympy==1.13.3
# via torch
tokenizers==0.19.1
# via
Expand Down
4 changes: 2 additions & 2 deletions requirements/ingest/airtable.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ inflection==0.5.1
# via pyairtable
pyairtable==2.3.3
# via -r ./ingest/airtable.in
pydantic==2.9.1
pydantic==2.9.2
# via pyairtable
pydantic-core==2.23.3
pydantic-core==2.23.4
# via pydantic
requests==2.32.3
# via
Expand Down
6 changes: 3 additions & 3 deletions requirements/ingest/astradb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#
# pip-compile ./ingest/astradb.in
#
anyio==4.4.0
anyio==4.5.0
# via
# -c ./ingest/../base.txt
# httpx
astrapy==1.4.2
# via -r ./ingest/astradb.in
cassandra-driver==3.29.2
# via cassio
cassio==0.1.8
cassio==0.1.9
# via astrapy
certifi==2024.8.30
# via
Expand Down Expand Up @@ -70,7 +70,7 @@ packaging==24.1
# via
# -c ./ingest/../base.txt
# deprecation
pymongo==4.8.0
pymongo==4.9.1
# via astrapy
requests==2.32.3
# via
Expand Down
14 changes: 8 additions & 6 deletions requirements/ingest/azure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ azure-core==1.31.0
# azure-storage-blob
azure-datalake-store==0.0.53
# via adlfs
azure-identity==1.17.1
azure-identity==1.18.0
# via adlfs
azure-storage-blob==12.22.0
azure-storage-blob==12.23.0
# via adlfs
certifi==2024.8.30
# via
# -c ./ingest/../base.txt
# requests
cffi==1.17.1
# via
# -c ./ingest/../base.txt
# azure-datalake-store
# cryptography
charset-normalizer==3.3.2
Expand All @@ -41,6 +42,7 @@ charset-normalizer==3.3.2
# requests
cryptography==43.0.1
# via
# -c ./ingest/../base.txt
# azure-identity
# azure-storage-blob
# msal
Expand Down Expand Up @@ -74,11 +76,11 @@ multidict==6.1.0
portalocker==2.10.1
# via msal-extensions
pycparser==2.22
# via cffi
pyjwt[crypto]==2.9.0
# via
# msal
# pyjwt
# -c ./ingest/../base.txt
# cffi
pyjwt[crypto]==2.9.0
# via msal
requests==2.32.3
# via
# -c ./ingest/../base.txt
Expand Down
12 changes: 9 additions & 3 deletions requirements/ingest/box.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ certifi==2024.8.30
# -c ./ingest/../base.txt
# requests
cffi==1.17.1
# via cryptography
# via
# -c ./ingest/../base.txt
# cryptography
charset-normalizer==3.3.2
# via
# -c ./ingest/../base.txt
# requests
cryptography==43.0.1
# via boxsdk
# via
# -c ./ingest/../base.txt
# boxsdk
fsspec==2024.9.0
# via
# -r ./ingest/box.in
Expand All @@ -31,7 +35,9 @@ idna==3.10
# -c ./ingest/../base.txt
# requests
pycparser==2.22
# via cffi
# via
# -c ./ingest/../base.txt
# cffi
pyjwt==2.9.0
# via boxsdk
python-dateutil==2.9.0.post0
Expand Down
Loading

0 comments on commit 7d66a23

Please sign in to comment.