diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 1bcd489c2..6461bedd6 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -47,9 +47,8 @@ jobs: password: ${{ secrets.QUAY_IO_ROBOT_TOKEN }} - name: Build images run: | - ARCH=$(cut -d "/" -f2 <<< ${{ matrix.docker-platform }}) - DOCKER_BUILDKIT=1 docker buildx build --platform=$ARCH --load \ - -f Dockerfile-$ARCH \ + DOCKER_BUILDKIT=1 docker buildx build --platform=${{ matrix.docker-platform }} --load \ + -f Dockerfile \ --build-arg PIP_VERSION=$PIP_VERSION \ --build-arg BUILDKIT_INLINE_CACHE=1 \ --progress plain \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 1501755f2..f2ca7e03f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ### Enhancements +* **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. + ### Features ### Fixes diff --git a/Dockerfile-amd64 b/Dockerfile similarity index 91% rename from Dockerfile-amd64 rename to Dockerfile index 390a6912a..2e10d44f2 100644 --- a/Dockerfile-amd64 +++ b/Dockerfile @@ -9,7 +9,7 @@ COPY unstructured unstructured COPY test_unstructured test_unstructured COPY example-docs example-docs -RUN chown -R notebook-user:notebook-user /app +RUN chown -R notebook-user:notebook-user /app && ln -s /usr/bin/python3.11 /usr/bin/python3 USER notebook-user diff --git a/Dockerfile-arm64 b/docker/rockylinux-9.2/Dockerfile similarity index 100% rename from Dockerfile-arm64 rename to docker/rockylinux-9.2/Dockerfile diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh index 2d15884e6..b10eb5ddb 100755 --- a/scripts/docker-build.sh +++ b/scripts/docker-build.sh @@ -5,7 +5,7 @@ DOCKER_REPOSITORY="${DOCKER_REPOSITORY:-quay.io/unstructured-io/unstructured}" PIP_VERSION="${PIP_VERSION:-23.1.2}" DOCKER_IMAGE="${DOCKER_IMAGE:-unstructured:dev}" -DOCKER_BUILD_CMD=(docker buildx build --load -f Dockerfile-amd64 +DOCKER_BUILD_CMD=(docker buildx build --load -f Dockerfile --build-arg PIP_VERSION="$PIP_VERSION" --build-arg BUILDKIT_INLINE_CACHE=1 --progress plain diff --git a/scripts/docker-smoke-test.sh b/scripts/docker-smoke-test.sh index bb4afa7c3..1d0950e92 100755 --- a/scripts/docker-smoke-test.sh +++ b/scripts/docker-smoke-test.sh @@ -38,16 +38,10 @@ trap stop_container EXIT await_container # Run the tests -if [[ "$DOCKER_IMAGE" == *"arm64"* ]]; then - docker cp test_unstructured_ingest $CONTAINER_NAME:/home/notebook-user - docker exec -u root "$CONTAINER_NAME" /bin/bash -c "chown -R 1000:1000 /home/notebook-user/test_unstructured_ingest" - docker exec "$CONTAINER_NAME" /bin/bash -c "/home/notebook-user/test_unstructured_ingest/src/wikipedia.sh" -else - docker cp test_unstructured_ingest $CONTAINER_NAME:/app - docker cp requirements/ingest $CONTAINER_NAME:/app/requirements/ingest - docker exec -u root "$CONTAINER_NAME" /bin/bash -c "chown -R notebook-user:notebook-user /app/test_unstructured_ingest" - docker exec "$CONTAINER_NAME" /bin/bash -c "/app/test_unstructured_ingest/src/wikipedia.sh" -fi +docker cp test_unstructured_ingest $CONTAINER_NAME:/app +docker cp requirements/ingest $CONTAINER_NAME:/app/requirements/ingest +docker exec -u root "$CONTAINER_NAME" /bin/bash -c "chown -R notebook-user:notebook-user /app/test_unstructured_ingest" +docker exec "$CONTAINER_NAME" /bin/bash -c "/app/test_unstructured_ingest/src/wikipedia.sh" result=$? exit $result