mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 01:21:48 +03:00
35 lines
924 B
Docker
35 lines
924 B
Docker
# Using a slim version for a smaller base image
|
|
FROM python:3.11.6-slim-bullseye
|
|
|
|
# Install GEOS library, Rust, and other dependencies, then clean up
|
|
RUN apt-get clean && apt-get update && apt-get install -y \
|
|
curl \
|
|
gcc \
|
|
# Additional dependencies for document handling
|
|
libmagic-dev \
|
|
tesseract-ocr \
|
|
poppler-utils \
|
|
libreoffice \
|
|
pandoc && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set the working directory
|
|
WORKDIR /code
|
|
|
|
# Install Poetry
|
|
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python && \
|
|
cd /usr/local/bin && \
|
|
ln -s /opt/poetry/bin/poetry && \
|
|
poetry config virtualenvs.create false
|
|
|
|
# Add Poetry to PATH
|
|
ENV PATH="/root/.local/bin:$PATH"
|
|
|
|
# Copy the current directory contents into the container at /app
|
|
COPY ./pyproject.toml ./poetry.lock* /code/
|
|
|
|
# Install project dependencies
|
|
RUN poetry install --no-root --with test
|
|
|
|
ENV PYTHONPATH=/code
|