Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ main ]

env:
PYTHON_VERSION: "3.10"
PYTHON_VERSION: "3.12"
PIPELINE_FAMILY: "general"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
PACKAGE: "unstructured-api"
PIPELINE_FAMILY: "general"
PIP_VERSION: "25.1.1"
PYTHON_VERSION: "3.10"
PYTHON_VERSION: "3.12"

jobs:
setup:
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
## 0.0.87
* Bump Python to 3.12

## 0.0.86
* Patch various CVEs

## 0.0.86
## 0.0.85
* Patch various CVEs
* Bump Python version to 3.12, some packages no longer support 3.9

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,12 @@ curl -X 'POST'
* Using `pyenv` to manage virtualenv's is recommended
* Mac install instructions. See [here](https://github.com/Unstructured-IO/community#mac--homebrew) for more detailed instructions.
* `brew install pyenv-virtualenv`
* `pyenv install 3.10.12`
* `pyenv install 3.12`
* Linux instructions are available [here](https://github.com/Unstructured-IO/community#linux).

* Create a virtualenv to work in and activate it, e.g. for one named `document-processing`:

`pyenv virtualenv 3.10.12 unstructured-api` <br />
`pyenv virtualenv 3.12 unstructured-api` <br />
`pyenv activate unstructured-api`

See the [Unstructured Quick Start](https://github.com/Unstructured-IO/unstructured#eight_pointed_black_star-quick-start) for the many OS dependencies that are required, if the ability to process all file types is desired.
Expand Down
12 changes: 6 additions & 6 deletions docker/rockylinux-9.4/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:rocky9.2-9@sha256:73d8492452f086144d4b92b7931aa04719f085c74d16cae81e8826ef873729c9 as base
FROM quay.io/unstructured-io/base-images:wolfi-base-latest AS base

# NOTE(crag): NB_USER ARG for mybinder.org compat:
# https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html
Expand All @@ -22,18 +22,18 @@ ENV PATH="/home/${NB_USER}/.local/bin:${PATH}"
FROM base as python-deps
# COPY requirements/dev.txt requirements-dev.txt
COPY requirements/base.txt requirements-base.txt
RUN python3.10 -m pip install pip==${PIP_VERSION} \
RUN python3.12 -m pip install pip==${PIP_VERSION} \
&& dnf -y groupinstall "Development Tools" \
&& su -l ${NB_USER} -c 'pip3.10 install --no-cache -r requirements-base.txt' \
&& su -l ${NB_USER} -c 'pip3.12 install --no-cache -r requirements-base.txt' \
&& dnf -y groupremove "Development Tools" \
&& dnf clean all \
&& ln -s /home/notebook-user/.local/bin/pip3.10 /usr/local/bin/pip3.10 || true
&& ln -s /home/notebook-user/.local/bin/pip3.12 /usr/local/bin/pip3.12 || true

USER ${NB_USER}

FROM python-deps as model-deps
RUN python3.10 -c "from unstructured.nlp.tokenize import download_nltk_packages; download_nltk_packages()" && \
python3.10 -c "from unstructured.partition.model_init import initialize; initialize()"
RUN python3.12 -c "from unstructured.nlp.tokenize import download_nltk_packages; download_nltk_packages()" && \
python3.12 -c "from unstructured.partition.model_init import initialize; initialize()"

FROM model-deps as code
COPY --chown=${NB_USER}:${NB_USER} CHANGELOG.md CHANGELOG.md
Expand Down
2 changes: 1 addition & 1 deletion prepline_general/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
app = FastAPI(
title="Unstructured Pipeline API",
summary="Partition documents with the Unstructured library",
version="0.0.86",
version="0.0.87",
docs_url="/general/docs",
openapi_url="/general/openapi.json",
servers=[
Expand Down
4 changes: 2 additions & 2 deletions prepline_general/api/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def return_content_type(filename: str):


@router.get("/general/v0/general", include_in_schema=False)
@router.get("/general/v0.0.86/general", include_in_schema=False)
@router.get("/general/v0.0.87/general", include_in_schema=False)
async def handle_invalid_get_request():
raise HTTPException(
status_code=status.HTTP_405_METHOD_NOT_ALLOWED, detail="Only POST requests are supported."
Expand All @@ -615,7 +615,7 @@ async def handle_invalid_get_request():
description="Description",
operation_id="partition_parameters",
)
@router.post("/general/v0.0.86/general", include_in_schema=False)
@router.post("/general/v0.0.87/general", include_in_schema=False)
def general_partition(
request: Request,
# cannot use annotated type here because of a bug described here:
Expand Down
2 changes: 1 addition & 1 deletion preprocessing-pipeline-family.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name: general
version: 0.0.86
version: 0.0.87