Skip to content

Commit 2d965fd

Browse files
authored
build: switch arm64 image to wolfi-base (#3268)
### Summary Updates the `arm64` build to use the same `Dockerfile` as `amd64`, since there are now upstream base images for `wolfi-base` for both architectures. The legacy `rockylinux-9.4` is now stashed in a subdirectory the `docker` subdirectory and is no longer built in CI, but is available is users would like to build it themselves. Additionally, this PR includes a fix to symlink `python3` to `python3.11`, which had caused a CI failure [here](https://github.com/Unstructured-IO/unstructured/actions/runs/9619486931/job/26535697755). BREAKING CHANGE: the `arm64` image no longer supports `.doc`, `.pptx`, or `.xls` because we do not yet have a `libreoffice` `apk` built for `wolfi-base`. We intend to address that as a follow on. All other filetypes work. ### Testing Successfully docker builds, tests, and smoke tests for [amd64](https://github.com/Unstructured-IO/unstructured/actions/runs/9619458140/job/26535610735?pr=3268) and [arm64](https://github.com/Unstructured-IO/unstructured/actions/runs/9619458140/job/26535610341?pr=3268) on the feature branch (with publish disabled).
1 parent edddf9f commit 2d965fd

File tree

6 files changed

+10
-15
lines changed

6 files changed

+10
-15
lines changed

Diff for: .github/workflows/docker-publish.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ jobs:
4747
password: ${{ secrets.QUAY_IO_ROBOT_TOKEN }}
4848
- name: Build images
4949
run: |
50-
ARCH=$(cut -d "/" -f2 <<< ${{ matrix.docker-platform }})
51-
DOCKER_BUILDKIT=1 docker buildx build --platform=$ARCH --load \
52-
-f Dockerfile-$ARCH \
50+
DOCKER_BUILDKIT=1 docker buildx build --platform=${{ matrix.docker-platform }} --load \
51+
-f Dockerfile \
5352
--build-arg PIP_VERSION=$PIP_VERSION \
5453
--build-arg BUILDKIT_INLINE_CACHE=1 \
5554
--progress plain \

Diff for: CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
### Enhancements
44

5+
* **Move arm64 image to wolfi-base** The `arm64` image now runs on `wolfi-base`. The `arm64` build for `wolfi-base` does not yet include `libreoffce`, and so `arm64` does not currently support processing `.doc`, `.ppt`, or `.xls` file. If you need to process those files on `arm64`, use the legacy `rockylinux` image.
6+
57
### Features
68

79
### Fixes

Diff for: Dockerfile-amd64 renamed to Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ COPY unstructured unstructured
99
COPY test_unstructured test_unstructured
1010
COPY example-docs example-docs
1111

12-
RUN chown -R notebook-user:notebook-user /app
12+
RUN chown -R notebook-user:notebook-user /app && ln -s /usr/bin/python3.11 /usr/bin/python3
1313

1414
USER notebook-user
1515

File renamed without changes.

Diff for: scripts/docker-build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DOCKER_REPOSITORY="${DOCKER_REPOSITORY:-quay.io/unstructured-io/unstructured}"
55
PIP_VERSION="${PIP_VERSION:-23.1.2}"
66
DOCKER_IMAGE="${DOCKER_IMAGE:-unstructured:dev}"
77

8-
DOCKER_BUILD_CMD=(docker buildx build --load -f Dockerfile-amd64
8+
DOCKER_BUILD_CMD=(docker buildx build --load -f Dockerfile
99
--build-arg PIP_VERSION="$PIP_VERSION"
1010
--build-arg BUILDKIT_INLINE_CACHE=1
1111
--progress plain

Diff for: scripts/docker-smoke-test.sh

+4-10
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,10 @@ trap stop_container EXIT
3838
await_container
3939

4040
# Run the tests
41-
if [[ "$DOCKER_IMAGE" == *"arm64"* ]]; then
42-
docker cp test_unstructured_ingest $CONTAINER_NAME:/home/notebook-user
43-
docker exec -u root "$CONTAINER_NAME" /bin/bash -c "chown -R 1000:1000 /home/notebook-user/test_unstructured_ingest"
44-
docker exec "$CONTAINER_NAME" /bin/bash -c "/home/notebook-user/test_unstructured_ingest/src/wikipedia.sh"
45-
else
46-
docker cp test_unstructured_ingest $CONTAINER_NAME:/app
47-
docker cp requirements/ingest $CONTAINER_NAME:/app/requirements/ingest
48-
docker exec -u root "$CONTAINER_NAME" /bin/bash -c "chown -R notebook-user:notebook-user /app/test_unstructured_ingest"
49-
docker exec "$CONTAINER_NAME" /bin/bash -c "/app/test_unstructured_ingest/src/wikipedia.sh"
50-
fi
41+
docker cp test_unstructured_ingest $CONTAINER_NAME:/app
42+
docker cp requirements/ingest $CONTAINER_NAME:/app/requirements/ingest
43+
docker exec -u root "$CONTAINER_NAME" /bin/bash -c "chown -R notebook-user:notebook-user /app/test_unstructured_ingest"
44+
docker exec "$CONTAINER_NAME" /bin/bash -c "/app/test_unstructured_ingest/src/wikipedia.sh"
5145

5246
result=$?
5347
exit $result

0 commit comments

Comments
 (0)