|
@@ -80,25 +80,25 @@ RUN mkdir -p $HOME/.cache/chroma
|
|
|
RUN echo -n 00000000-0000-0000-0000-000000000000 > $HOME/.cache/chroma/telemetry_user_id
|
|
|
|
|
|
RUN if [ "$USE_OLLAMA" = "true" ]; then \
|
|
|
- apt-get update && \
|
|
|
- # Install pandoc and netcat
|
|
|
- apt-get install -y --no-install-recommends pandoc netcat-openbsd curl && \
|
|
|
- # for RAG OCR
|
|
|
- apt-get install -y --no-install-recommends ffmpeg libsm6 libxext6 && \
|
|
|
- # install helper tools
|
|
|
- apt-get install -y --no-install-recommends curl && \
|
|
|
- # install ollama
|
|
|
- curl -fsSL https://ollama.com/install.sh | sh && \
|
|
|
- # cleanup
|
|
|
- rm -rf /var/lib/apt/lists/*; \
|
|
|
+ apt-get update && \
|
|
|
+ # Install pandoc and netcat
|
|
|
+ apt-get install -y --no-install-recommends pandoc netcat-openbsd curl && \
|
|
|
+ # for RAG OCR
|
|
|
+ apt-get install -y --no-install-recommends ffmpeg libsm6 libxext6 && \
|
|
|
+ # install helper tools
|
|
|
+ apt-get install -y --no-install-recommends curl && \
|
|
|
+ # install ollama
|
|
|
+ curl -fsSL https://ollama.com/install.sh | sh && \
|
|
|
+ # cleanup
|
|
|
+ rm -rf /var/lib/apt/lists/*; \
|
|
|
else \
|
|
|
- apt-get update && \
|
|
|
- # Install pandoc and netcat
|
|
|
- apt-get install -y --no-install-recommends pandoc netcat-openbsd curl && \
|
|
|
- # for RAG OCR
|
|
|
- apt-get install -y --no-install-recommends ffmpeg libsm6 libxext6 && \
|
|
|
- # cleanup
|
|
|
- rm -rf /var/lib/apt/lists/*; \
|
|
|
+ apt-get update && \
|
|
|
+ # Install pandoc and netcat
|
|
|
+ apt-get install -y --no-install-recommends pandoc netcat-openbsd curl && \
|
|
|
+ # for RAG OCR
|
|
|
+ apt-get install -y --no-install-recommends ffmpeg libsm6 libxext6 && \
|
|
|
+ # cleanup
|
|
|
+ rm -rf /var/lib/apt/lists/*; \
|
|
|
fi
|
|
|
|
|
|
# install python dependencies
|
|
@@ -106,16 +106,16 @@ COPY ./backend/requirements.txt ./requirements.txt
|
|
|
|
|
|
RUN pip3 install uv && \
|
|
|
if [ "$USE_CUDA" = "true" ]; then \
|
|
|
- # If you use CUDA the whisper and embedding model will be downloaded on first use
|
|
|
- pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/$USE_CUDA_DOCKER_VER --no-cache-dir && \
|
|
|
- uv pip install --system -r requirements.txt --no-cache-dir && \
|
|
|
- python -c "import os; from sentence_transformers import SentenceTransformer; SentenceTransformer(os.environ['RAG_EMBEDDING_MODEL'], device='cpu')" && \
|
|
|
- python -c "import os; from faster_whisper import WhisperModel; WhisperModel(os.environ['WHISPER_MODEL'], device='cpu', compute_type='int8', download_root=os.environ['WHISPER_MODEL_DIR'])"; \
|
|
|
+ # If you use CUDA the whisper and embedding model will be downloaded on first use
|
|
|
+ pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/$USE_CUDA_DOCKER_VER --no-cache-dir && \
|
|
|
+ uv pip install --system -r requirements.txt --no-cache-dir && \
|
|
|
+ python -c "import os; from sentence_transformers import SentenceTransformer; SentenceTransformer(os.environ['RAG_EMBEDDING_MODEL'], device='cpu')" && \
|
|
|
+ python -c "import os; from faster_whisper import WhisperModel; WhisperModel(os.environ['WHISPER_MODEL'], device='cpu', compute_type='int8', download_root=os.environ['WHISPER_MODEL_DIR'])"; \
|
|
|
else \
|
|
|
- pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu --no-cache-dir && \
|
|
|
- uv pip install --system -r requirements.txt --no-cache-dir && \
|
|
|
- python -c "import os; from sentence_transformers import SentenceTransformer; SentenceTransformer(os.environ['RAG_EMBEDDING_MODEL'], device='cpu')" && \
|
|
|
- python -c "import os; from faster_whisper import WhisperModel; WhisperModel(os.environ['WHISPER_MODEL'], device='cpu', compute_type='int8', download_root=os.environ['WHISPER_MODEL_DIR'])"; \
|
|
|
+ pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu --no-cache-dir && \
|
|
|
+ uv pip install --system -r requirements.txt --no-cache-dir && \
|
|
|
+ python -c "import os; from sentence_transformers import SentenceTransformer; SentenceTransformer(os.environ['RAG_EMBEDDING_MODEL'], device='cpu')" && \
|
|
|
+ python -c "import os; from faster_whisper import WhisperModel; WhisperModel(os.environ['WHISPER_MODEL'], device='cpu', compute_type='int8', download_root=os.environ['WHISPER_MODEL_DIR'])"; \
|
|
|
fi
|
|
|
|
|
|
|
|
@@ -134,6 +134,6 @@ COPY ./backend .
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
-HEALTHCHECK CMD curl --fail http://localhost:8080 || exit 1
|
|
|
+HEALTHCHECK CMD curl --fail http://localhost:8080/health || exit 1
|
|
|
|
|
|
CMD [ "bash", "start.sh"]
|