diff --git a/CHANGELOG.md b/CHANGELOG.md index 875f09861..17cb66d3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 0.17.5 + +### Enhancements +- **Remove test and dev dependencies from docker image.** This reduces the docker image size slightly and reduces potential security vulnerabilities. + +### Features + +### Fixes +- **Removed out of date ubuntu Dockerfile.** The Dockerfile was out of date and non-functional. + ## 0.17.4 ### Enhancements diff --git a/Dockerfile b/Dockerfile index 69b96d3e6..e4d7ebd5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ ENV TESSDATA_PREFIX=/usr/local/share/tessdata ENV NLTK_DATA=/home/notebook-user/nltk_data # Install Python dependencies and download required NLTK packages -RUN find requirements/ -type f -name "*.txt" -exec $PIP install --no-cache-dir --user -r '{}' ';' && \ +RUN find requirements/ -type f -name "*.txt" ! -name "test.txt" ! -name "dev.txt" ! -name "constraints.txt" -exec $PIP install --no-cache-dir --user -r '{}' ';' && \ mkdir -p ${NLTK_DATA} && \ $PYTHON -m nltk.downloader -d ${NLTK_DATA} punkt_tab averaged_perceptron_tagger_eng && \ $PYTHON -c "from unstructured.partition.model_init import initialize; initialize()" && \ diff --git a/Makefile b/Makefile index c5208c365..80600a051 100644 --- a/Makefile +++ b/Makefile @@ -310,7 +310,8 @@ docker-test: -v ${CURRENT_DIR}/test_unstructured_ingest:/home/notebook-user/test_unstructured_ingest \ $(if $(wildcard uns_test_env_file),--env-file uns_test_env_file,) \ $(DOCKER_IMAGE) \ - bash -c "CI=$(CI) \ + bash -c "pip install -r requirements/test.txt -r requirements/dev.txt && \ + CI=$(CI) \ UNSTRUCTURED_INCLUDE_DEBUG_METADATA=$(UNSTRUCTURED_INCLUDE_DEBUG_METADATA) \ python3 -m pytest $(if $(TEST_FILE),$(TEST_FILE),test_unstructured)" diff --git a/docker/rockylinux-9.2/Dockerfile b/docker/rockylinux-9.2/Dockerfile index 3bce864e3..051294dc9 100644 --- a/docker/rockylinux-9.2/Dockerfile +++ b/docker/rockylinux-9.2/Dockerfile @@ -22,7 +22,7 @@ COPY requirements requirements RUN python3.10 -m pip install pip==${PIP_VERSION} && \ dnf -y groupinstall "Development Tools" && \ - find requirements/ -type f -name "*.txt" -exec python3 -m pip install --no-cache -r '{}' ';' && \ + find requirements/ -type f -name "*.txt" ! -name "test.txt" ! -name "dev.txt" ! -name "constraints.txt" -exec python3 -m pip install --no-cache -r '{}' ';' && \ dnf -y groupremove "Development Tools" && \ dnf clean all diff --git a/docker/ubuntu-22/Dockerfile b/docker/ubuntu-22/Dockerfile deleted file mode 100644 index 059bfc85b..000000000 --- a/docker/ubuntu-22/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -# Dockerfile that approximates the CI image -# -# Mainly useful for updating test-ingest fixtures - -FROM ubuntu:22.04 - -COPY scripts/setup_ubuntu.sh scripts/setup_ubuntu.sh - -RUN bash scripts/setup_ubuntu.sh root - -COPY requirements/ requirements/ -COPY Makefile Makefile - -SHELL ["/bin/bash", "-c"] - -RUN source ~/.bashrc && pyenv virtualenv 3.10 unstructured && \ - source ~/.pyenv/versions/unstructured/bin/activate && \ - make install-ci && \ - make install-ingest-s3 && \ - make install-ingest-azure && \ - make install-ingest-github && \ - make install-ingest-gitlab && \ - make install-ingest-wikipedia && \ - make install-ingest-discord && \ - make install install-ingest-slack && \ - make install-ingest-confluence diff --git a/unstructured/__version__.py b/unstructured/__version__.py index 033f217a2..b243ca786 100644 --- a/unstructured/__version__.py +++ b/unstructured/__version__.py @@ -1 +1 @@ -__version__ = "0.17.4" # pragma: no cover +__version__ = "0.17.5" # pragma: no cover