mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-03 12:52:39 +02:00
Merge pull request #1337 from MODSetter/dev
Some checks are pending
Build and Push Docker Images / tag_release (push) Waiting to run
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64) (push) Blocked by required conditions
Build and Push Docker Images / create_manifest (backend, surfsense-backend) (push) Blocked by required conditions
Build and Push Docker Images / create_manifest (web, surfsense-web) (push) Blocked by required conditions
Obsidian Plugin Lint / lint (push) Waiting to run
Some checks are pending
Build and Push Docker Images / tag_release (push) Waiting to run
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64) (push) Blocked by required conditions
Build and Push Docker Images / create_manifest (backend, surfsense-backend) (push) Blocked by required conditions
Build and Push Docker Images / create_manifest (web, surfsense-web) (push) Blocked by required conditions
Obsidian Plugin Lint / lint (push) Waiting to run
fix: docker issues
This commit is contained in:
commit
90a653c8c7
3 changed files with 29 additions and 14 deletions
|
|
@ -38,16 +38,26 @@ RUN pip install --upgrade certifi pip-system-certs
|
|||
COPY pyproject.toml .
|
||||
COPY uv.lock .
|
||||
|
||||
# Install PyTorch based on architecture
|
||||
RUN if [ "$(uname -m)" = "x86_64" ]; then \
|
||||
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121; \
|
||||
else \
|
||||
pip install --no-cache-dir torch torchvision torchaudio; \
|
||||
fi
|
||||
|
||||
# Install python dependencies
|
||||
# Install all Python dependencies from uv.lock for deterministic builds.
|
||||
#
|
||||
# `uv pip install -e .` re-resolves from pyproject.toml and ignores uv.lock,
|
||||
# which lets prod silently drift to newer upstream versions on every rebuild
|
||||
# (e.g. deepagents 0.4.x -> 0.5.x breaking the FilesystemMiddleware imports).
|
||||
# Exporting the lock to requirements.txt and feeding it to `uv pip install`
|
||||
# pins every transitive package to the exact version captured in uv.lock.
|
||||
#
|
||||
# Note on torch/CUDA: we do NOT install torch from a separate cu* index here.
|
||||
# PyPI's torch wheels for Linux x86_64 already ship CUDA-enabled and pull
|
||||
# nvidia-cudnn-cu13, nvidia-nccl-cu13, triton, etc. as install deps (all
|
||||
# captured in uv.lock). Installing from cu121 first only wasted ~2GB of
|
||||
# downloads that the lock-based install immediately replaced. If a specific
|
||||
# CUDA version is needed (driver compatibility, etc.), wire it through
|
||||
# [tool.uv.sources] in pyproject.toml so the lock stays the source of truth.
|
||||
RUN pip install --no-cache-dir uv && \
|
||||
uv pip install --system --no-cache-dir -e .
|
||||
uv export --frozen --no-dev --no-hashes --no-emit-project \
|
||||
--format requirements-txt -o /tmp/requirements.txt && \
|
||||
uv pip install --system --no-cache-dir -r /tmp/requirements.txt && \
|
||||
rm /tmp/requirements.txt
|
||||
|
||||
# Set SSL environment variables dynamically
|
||||
RUN CERTIFI_PATH=$(python -c "import certifi; print(certifi.where())") && \
|
||||
|
|
@ -66,13 +76,18 @@ RUN cd /root/.EasyOCR/model && (unzip -o english_g2.zip || true) && (unzip -o cr
|
|||
# Pre-download Docling models
|
||||
RUN python -c "try:\n from docling.document_converter import DocumentConverter\n conv = DocumentConverter()\nexcept:\n pass" || true
|
||||
|
||||
# Install Playwright browsers for web scraping if needed
|
||||
RUN pip install playwright && \
|
||||
playwright install chromium --with-deps
|
||||
# Install Playwright browsers for web scraping (the playwright package itself
|
||||
# is already installed via uv.lock above)
|
||||
RUN playwright install chromium --with-deps
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Install the project itself in editable mode. Dependencies were already
|
||||
# installed deterministically from uv.lock above, so --no-deps prevents any
|
||||
# re-resolution that could pull newer versions.
|
||||
RUN uv pip install --system --no-cache-dir --no-deps -e .
|
||||
|
||||
# Copy and set permissions for entrypoint script
|
||||
# Use dos2unix to ensure LF line endings (fixes CRLF issues from Windows checkouts)
|
||||
COPY scripts/docker/entrypoint.sh /app/scripts/docker/entrypoint.sh
|
||||
|
|
|
|||
|
|
@ -71,11 +71,11 @@ dependencies = [
|
|||
"langchain>=1.2.13",
|
||||
"langgraph>=1.1.3",
|
||||
"langchain-community>=0.4.1",
|
||||
"deepagents>=0.4.12",
|
||||
"stripe>=15.0.0",
|
||||
"azure-ai-documentintelligence>=1.0.2",
|
||||
"litellm>=1.83.7",
|
||||
"langchain-litellm>=0.6.4",
|
||||
"deepagents>=0.4.12,<0.5",
|
||||
]
|
||||
|
||||
[dependency-groups]
|
||||
|
|
|
|||
2
surfsense_backend/uv.lock
generated
2
surfsense_backend/uv.lock
generated
|
|
@ -8045,7 +8045,7 @@ requires-dist = [
|
|||
{ name = "composio", specifier = ">=0.10.9" },
|
||||
{ name = "datasets", specifier = ">=2.21.0" },
|
||||
{ name = "daytona", specifier = ">=0.146.0" },
|
||||
{ name = "deepagents", specifier = ">=0.4.12" },
|
||||
{ name = "deepagents", specifier = ">=0.4.12,<0.5" },
|
||||
{ name = "discord-py", specifier = ">=2.5.2" },
|
||||
{ name = "docling", specifier = ">=2.15.0" },
|
||||
{ name = "elasticsearch", specifier = ">=9.1.1" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue