Skip to content

Commit 733171a

Browse files
committed
Update workflow, Dockerfile, and smoke test scripti, to fix the arm64 failing
1 parent d42a6cf commit 733171a

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.github/workflows/docker-publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- luke/manual-deploy
78

89
env:
910
DOCKER_REPOSITORY: quay.io/unstructured-io/unstructured-api
@@ -55,7 +56,8 @@ jobs:
5556
- name: Set up Docker Buildx
5657
uses: docker/setup-buildx-action@v3
5758
with:
58-
driver: ${{ matrix.arch == 'amd64' && 'docker' || 'docker-container' }}
59+
#driver: ${{ matrix.arch == 'amd64' && 'docker' || 'docker-container' }}
60+
driver: ${{ 'docker-container' }}
5961
- name: Checkout code
6062
uses: actions/checkout@v4
6163
- name: Login to Quay.io
@@ -70,7 +72,7 @@ jobs:
7072
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/share/boost
7173
7274
DOCKER_BUILDKIT=1 docker buildx build --load -f Dockerfile \
73-
--platform=$DOCKER_PLATFORM \
75+
--platform=${{ matrix.arch }} \
7476
--build-arg PIP_VERSION=$PIP_VERSION \
7577
--build-arg BUILDKIT_INLINE_CACHE=1 \
7678
--build-arg PIPELINE_PACKAGE=${{ env.PIPELINE_FAMILY }} \

Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,22 @@ ARG PIPELINE_PACKAGE
1010
ARG PYTHON_VERSION="3.11"
1111

1212
# Set up environment
13-
ENV PYTHON python${PYTHON_VERSION}
14-
ENV PIP ${PYTHON} -m pip
13+
ENV PYTHON="python${PYTHON_VERSION}" \
14+
PIP="${PYTHON} -m pip" \
15+
PYTHONPATH="${PYTHONPATH}:${HOME}" \
16+
PATH="/home/${NB_USER}/.local/bin:${PATH}"
1517

1618
WORKDIR ${HOME}
1719
USER ${NB_USER}
1820

19-
ENV PYTHONPATH="${PYTHONPATH}:${HOME}"
20-
ENV PATH="/home/${NB_USER}/.local/bin:${PATH}"
21-
2221
FROM base as python-deps
2322
COPY --chown=${NB_USER}:${NB_USER} requirements/base.txt requirements-base.txt
24-
RUN ${PIP} install pip==${PIP_VERSION}
25-
RUN ${PIP} install --no-cache -r requirements-base.txt
23+
RUN ${PIP} install pip==${PIP_VERSION} && \
24+
${PIP} install --no-cache -r requirements-base.txt
2625

2726
FROM python-deps as model-deps
2827
RUN ${PYTHON} -c "from unstructured.nlp.tokenize import download_nltk_packages; download_nltk_packages()" && \
29-
${PYTHON} -c "from unstructured.partition.model_init import initialize; initialize()"
28+
${PYTHON} -c "from unstructured.partition.model_init import initialize; initialize()"
3029

3130
FROM model-deps as code
3231
COPY --chown=${NB_USER}:${NB_USER} CHANGELOG.md CHANGELOG.md

scripts/docker-smoke-test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ CONTAINER_NAME_PARALLEL=unstructured-api-smoke-test-parallel
1616
PIPELINE_FAMILY=${PIPELINE_FAMILY:-"general"}
1717
DOCKER_IMAGE="${DOCKER_IMAGE:-pipeline-family-${PIPELINE_FAMILY}-dev:latest}"
1818
SKIP_INFERENCE_TESTS="${SKIP_INFERENCE_TESTS:-false}"
19+
DOCKER_PLATFORM="${DOCKER_PLATFORM:-"linux/arm64"}"
1920

2021
start_container() {
2122

0 commit comments

Comments
 (0)