Skip to content

Commit

Permalink
build(image): bump Dockerfile to python3.10 (#1214)
Browse files Browse the repository at this point in the history
  • Loading branch information
cragwolfe authored Aug 28, 2023
1 parent 4c13d12 commit ba70828
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.10.8

### Enhancements

* Release docker image that installs Python 3.10 rather than 3.8

### Features

### Fixes

## 0.10.7

### Enhancements
Expand All @@ -19,7 +29,7 @@
* Add functionality to sort elements using `xy-cut` sorting approach in `partition_pdf` for `hi_res` and `fast` strategies
* Bump unstructured-inference
* Set OMP_THREAD_LIMIT to 1 if not set for better tesseract perf (0.5.17)

### Features

* Extract coordinates from PDFs and images when using OCR only strategy and add to metadata
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:experimental
FROM quay.io/unstructured-io/base-images:rocky8.7-3 as base
FROM quay.io/unstructured-io/base-images:rocky8.7-5 as base

ARG PIP_VERSION

Expand All @@ -15,7 +15,7 @@ FROM base as deps
# Copy and install Unstructured
COPY requirements requirements

RUN python3.8 -m pip install pip==${PIP_VERSION} && \
RUN python3.10 -m pip install pip==${PIP_VERSION} && \
dnf -y groupinstall "Development Tools" && \
pip install --no-cache -r requirements/base.txt && \
pip install --no-cache -r requirements/test.txt && \
Expand Down Expand Up @@ -50,14 +50,14 @@ RUN python3.8 -m pip install pip==${PIP_VERSION} && \
dnf -y groupremove "Development Tools" && \
dnf clean all

RUN python3.8 -c "import nltk; nltk.download('punkt')" && \
python3.8 -c "import nltk; nltk.download('averaged_perceptron_tagger')"
RUN python3.10 -c "import nltk; nltk.download('punkt')" && \
python3.10 -c "import nltk; nltk.download('averaged_perceptron_tagger')"

FROM deps as code

COPY example-docs example-docs
COPY unstructured unstructured

RUN python3.8 -c "from unstructured.ingest.doc_processor.generalized import initialize; initialize()"
RUN python3.10 -c "from unstructured.ingest.doc_processor.generalized import initialize; initialize()"

CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion unstructured/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.10.7" # pragma: no cover
__version__ = "0.10.8" # pragma: no cover

0 comments on commit ba70828

Please sign in to comment.