2024-07-08 18:55:36 -04:00
|
|
|
FROM quay.io/unstructured-io/base-images:wolfi-base-e48da6b@sha256:8ad3479e5dc87a86e4794350cca6385c01c6d110902c5b292d1a62e231be711b as base
|
2023-03-14 13:40:01 -07:00
|
|
|
|
2024-05-15 18:53:15 -04:00
|
|
|
USER root
|
2023-03-14 13:40:01 -07:00
|
|
|
|
2024-06-14 16:41:27 -04:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
2024-05-16 20:22:10 -04:00
|
|
|
COPY ./requirements requirements/
|
2023-03-14 13:40:01 -07:00
|
|
|
COPY unstructured unstructured
|
2024-05-15 18:53:15 -04:00
|
|
|
COPY test_unstructured test_unstructured
|
|
|
|
|
COPY example-docs example-docs
|
2023-03-14 13:40:01 -07:00
|
|
|
|
2024-06-26 15:14:55 +02:00
|
|
|
RUN chown -R notebook-user:notebook-user /app && \
|
2024-08-09 00:28:48 -04:00
|
|
|
apk add font-ubuntu git && \
|
2024-06-26 15:14:55 +02:00
|
|
|
fc-cache -fv && \
|
|
|
|
|
ln -s /usr/bin/python3.11 /usr/bin/python3
|
2024-06-14 16:41:27 -04:00
|
|
|
|
|
|
|
|
USER notebook-user
|
2024-05-15 18:53:15 -04:00
|
|
|
|
2024-07-01 15:39:32 -04:00
|
|
|
RUN find requirements/ -type f -name "*.txt" -exec pip3.11 install --no-cache-dir --user -r '{}' ';' && \
|
2024-07-08 18:55:36 -04:00
|
|
|
python3.11 -c "from unstructured.nlp.tokenize import download_nltk_packages; download_nltk_packages()" && \
|
2024-05-15 18:53:15 -04:00
|
|
|
python3.11 -c "from unstructured.partition.model_init import initialize; initialize()" && \
|
|
|
|
|
python3.11 -c "from unstructured_inference.models.tables import UnstructuredTableTransformerModel; model = UnstructuredTableTransformerModel(); model.initialize('microsoft/table-transformer-structure-recognition')"
|
|
|
|
|
|
2024-06-14 16:41:27 -04:00
|
|
|
ENV PATH="${PATH}:/home/notebook-user/.local/bin"
|
2024-05-15 18:53:15 -04:00
|
|
|
ENV TESSDATA_PREFIX=/usr/local/share/tessdata
|
2023-03-29 20:48:06 -07:00
|
|
|
|
2023-03-14 13:40:01 -07:00
|
|
|
CMD ["/bin/bash"]
|