-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: reenable arm64 builds for docker (#3045)
### Summary Closes #3034 and reenables ARM64 in the docker build and publish job. This was taken out in #3039 because we've only build `libreoffice` for AMD64 and not ARM64. If Chainguard publishes an `apk` for `libreoffice`, we can support a Chainguard image for both architectures. The smoke test now differs for both architectures, to reflect differences in the directory structure. ### Testing Build and publish ran successfully for ARM64 (job [here](https://github.com/Unstructured-IO/unstructured/actions/runs/9129712470/job/25104907497)) and AMD64 (job [here](https://github.com/Unstructured-IO/unstructured/actions/runs/9129712470/job/25104907826)).
- Loading branch information
1 parent
1c8b2b2
commit 9cd0e70
Showing
5 changed files
with
63 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# syntax=docker/dockerfile:experimental | ||
FROM quay.io/unstructured-io/base-images:rocky9.2-9@sha256:73d8492452f086144d4b92b7931aa04719f085c74d16cae81e8826ef873729c9 as base | ||
|
||
# NOTE(crag): NB_USER ARG for mybinder.org compat: | ||
# https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html | ||
ARG NB_USER=notebook-user | ||
ARG NB_UID=1000 | ||
ARG PIP_VERSION | ||
|
||
# Set up environment | ||
ENV HOME /home/${NB_USER} | ||
ENV PYTHONPATH="${PYTHONPATH}:${HOME}" | ||
ENV PATH="/home/usr/.local/bin:${PATH}" | ||
|
||
RUN groupadd --gid ${NB_UID} ${NB_USER} | ||
RUN useradd --uid ${NB_UID} --gid ${NB_UID} ${NB_USER} | ||
WORKDIR ${HOME} | ||
|
||
FROM base as deps | ||
# Copy and install Unstructured | ||
COPY requirements requirements | ||
|
||
RUN python3.10 -m pip install pip==${PIP_VERSION} && \ | ||
dnf -y groupinstall "Development Tools" && \ | ||
find requirements/ -type f -name "*.txt" -exec python3 -m pip install --no-cache -r '{}' ';' && \ | ||
dnf -y groupremove "Development Tools" && \ | ||
dnf clean all | ||
|
||
RUN python3.10 -c "import nltk; nltk.download('punkt')" && \ | ||
python3.10 -c "import nltk; nltk.download('averaged_perceptron_tagger')" | ||
|
||
FROM deps as code | ||
|
||
USER ${NB_USER} | ||
|
||
COPY example-docs example-docs | ||
COPY unstructured unstructured | ||
|
||
RUN python3.10 -c "from unstructured.partition.model_init import initialize; initialize()" | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters