mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-25 20:32:11 +03:00
744eea6d43
reduced size by 2 # Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
40 lines
983 B
Docker
40 lines
983 B
Docker
# Using a slim version for a smaller base image
|
|
FROM python:3.11.6-slim-bullseye
|
|
|
|
ARG DEV_MODE
|
|
ENV DEV_MODE=$DEV_MODE
|
|
|
|
# Install GEOS library, Rust, and other dependencies, then clean up
|
|
RUN apt-get clean && apt-get update && apt-get install -y \
|
|
libgeos-dev \
|
|
libcurl4-openssl-dev \
|
|
libssl-dev \
|
|
binutils \
|
|
pandoc \
|
|
curl \
|
|
git \
|
|
build-essential && \
|
|
rm -rf /var/lib/apt/lists/* && apt-get clean
|
|
|
|
# Add Rust binaries to the PATH
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
|
|
WORKDIR /code
|
|
|
|
# Copy just the requirements first
|
|
COPY ./requirements.txt .
|
|
|
|
# Upgrade pip
|
|
RUN pip install --upgrade pip
|
|
|
|
# Increase timeout to wait for the new installation
|
|
RUN pip install --no-cache-dir -r requirements.txt --timeout 200
|
|
|
|
RUN if [ "$DEV_MODE" = "true" ]; then pip install --no-cache debugpy --timeout 200; fi
|
|
|
|
# Copy the rest of the application
|
|
COPY . .
|
|
|
|
EXPOSE 5050
|
|
|
|
CMD ["uvicorn", "main:app","--reload", "--host", "0.0.0.0", "--port", "5050", "--workers", "6"] |