extractous
extractous copied to clipboard
Add Dockerfile
Simplify deployment and development with an example Dockerfile
Thanks for the feedback, can you please elaborate more on your use case? What do you expect the docker container to have?
It should require the minimum requirements for running the Python example. I tried for a couple hours yesterday, but couldn't get past some of the Rust dependencies.
I got this far:
FROM python:3.11-slim
RUN apt-get update && apt-get install -y \
curl \
build-essential \
libssl-dev \
pkg-config \
zlib1g-dev \
&& curl https://sh.rustup.rs -sSf | sh -s -- -y \
&& . $HOME/.cargo/env
# Set environment variables for Rust
ENV PATH="/root/.cargo/bin:${PATH}"
RUN pip install uv
WORKDIR /app
COPY requirements.txt .
RUN uv pip install --system -r requirements.txt
and requirements.txt was:
extractous
I'll try again in a few days, but didn't want to duplicate anybody else efforts.
Ultimately, it would be great to be able to run something like:
docker run -it --rm yobix-ai/extractous path/to/example.pdf
Also stuck on cargo errors within a python:3.11-slim container. Any insight would be great.
Also stuck on cargo errors within a python:3.11-slim container. Any insight would be great.
I was able to get a Dockerfile going in a separate project: https://github.com/ddrscott/extractous-api/blob/main/Dockerfile
I hacked it together by copying *.so from a mysterious build directory into Python's pip directory. It feels dirty to do it this way, so I didn't try to submit back into this project.
Odd because the library has wheels uploaded to pypi so shouldn't need cargo to install