Open bkbas26 opened 2 weeks ago
Can someone help me with this?
@bkbas26 , can I see your Dockerfile? (the Dockerfile in the main
branch doesn't install unstructured[all-docs]
)
And you can try this solution first: https://github.com/Cinnamon/kotaemon/pull/219/files
@bkbas26 , can I see your Dockerfile? (the Dockerfile in the
main
branch doesn't installunstructured[all-docs]
) And you can try this solution first: https://github.com/Cinnamon/kotaemon/pull/219/files
@cin-niko Thanks for your reply. Below is the Dockerfile that I had used to build.
FROM python:3.10-slim as base_image
RUN apt update -qqy \
&& apt install -y \
ssh git \
gcc g++ \
poppler-utils \
libpoppler-dev \
tesseract-ocr \
tesseract-ocr-jpn \
libsm6 \
libxext6 \
ffmpeg \
libmagic-dev \
&& \
apt-get clean && \
apt-get autoremove
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=UTF-8
WORKDIR /app
FROM base_image as dev
COPY . /app
RUN --mount=type=ssh pip install -e "libs/kotaemon[all]"
RUN --mount=type=ssh pip install -e "libs/ktem"
RUN pip install graphrag future unstructured[all-docs]
RUN pip install "pdfservices-sdk@git+https://github.com/niallcm/pdfservices-python-sdk.git@bump-and-unfreeze-requirements"
EXPOSE 7860
ENTRYPOINT ["gradio", "app.py"]
Yes I included unstructured[all-docs]
based on this PR (https://github.com/Cinnamon/kotaemon/pull/165/files). I tried with your solution of including
# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
and still the same error. Below is the updated Dockerfile that I tried to build.
# syntax=docker/dockerfile:1.0.0-experimental
FROM python:3.10-slim as base_image
# for additional file parsers
# tesseract-ocr \
# tesseract-ocr-jpn \
# libsm6 \
# libxext6 \
# ffmpeg \
RUN apt-get update -qqy && \
apt-get install -y --no-install-recommends \
ssh \
git \
gcc \
g++ \
poppler-utils \
libpoppler-dev \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/*
# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=UTF-8
WORKDIR /app
FROM base_image as dev
COPY . /app
RUN --mount=type=ssh pip install --no-cache-dir -e "libs/kotaemon[all]" \
&& pip install --no-cache-dir -e "libs/ktem" \
&& pip install --no-cache-dir graphrag future \
&& pip install --no-cache-dir "pdfservices-sdk@git+https://github.com/niallcm/pdfservices-python-sdk.git@bump-and-unfreeze-requirements"
ENTRYPOINT ["gradio", "app.py"]
Please check it, @bkbas26 https://github.com/Cinnamon/kotaemon/pull/219#discussion_r1744235014
@bkbas26 , I checked it.
Please add cargo to apt-get install
line in your Dockerfile and try building Docker again.
# syntax=docker/dockerfile:1.0.0-experimental
FROM python:3.10-slim as base_image
# for additional file parsers
# tesseract-ocr \
# tesseract-ocr-jpn \
# libsm6 \
# libxext6 \
# ffmpeg \
RUN apt-get update -qqy && \
apt-get install -y --no-install-recommends \
ssh \
git \
gcc \
g++ \
poppler-utils \
libpoppler-dev \
cargo \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/*
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=UTF-8
WORKDIR /app
FROM base_image as dev
COPY . /app
RUN --mount=type=ssh pip install --no-cache-dir -e "libs/kotaemon[all]" \
&& pip install --no-cache-dir -e "libs/ktem" \
&& pip install --no-cache-dir graphrag future unstructured[all-docs] \
&& pip install --no-cache-dir "pdfservices-sdk@git+https://github.com/niallcm/pdfservices-python-sdk.git@bump-and-unfreeze-requirements"
ENTRYPOINT ["gradio", "app.py"]
Description
I am trying to deploy Kotaemon application in Kubernetes. Building Docker image with the
Dockerfile
gives the below error.=> ERROR [dev 4/5] RUN pip install graphrag future unstructured[all-docs] 268.4s
Note : I am trying docker build in MacOS Sonomo 14.6.1 M2 Pro
Reproduction steps
Screenshots
No response
Logs
No response
Browsers
No response
OS
MacOS
Additional information
No response