Merge pull request #39 from outis1one/claude/fix-editmaskwithai-build-q8A5W

Disable rembg to fix build - numpy version conflict
This commit is contained in:
Outis
2026-01-27 12:59:22 -05:00
committed by GitHub
2 changed files with 13 additions and 14 deletions
+1 -4
View File
@@ -2,7 +2,7 @@ FROM python:3.11-slim
WORKDIR /app
# Install system dependencies for OpenCV, rembg, SAM, and image processing
# Install system dependencies for OpenCV, SAM, and image processing
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
@@ -20,9 +20,6 @@ COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Pre-download rembg model (u2net) to avoid first-run delay
RUN python -c "from rembg import remove; print('rembg model downloaded')" || true
# Copy application
COPY . .
+12 -10
View File
@@ -1,8 +1,8 @@
fastapi==0.109.0
uvicorn[standard]==0.27.0
python-multipart==0.0.6
Pillow>=12.1.0,<13.0.0
# numpy version will be resolved by pip based on torch/rembg requirements
Pillow>=10.0.0,<11.0.0
numpy<2.0.0
sqlalchemy==2.0.25
python-jose[cryptography]==3.3.0
passlib[bcrypt]==1.7.4
@@ -13,13 +13,15 @@ pydantic==2.5.3
pydantic-settings==2.1.0
email-validator==2.1.0
opencv-python-headless==4.9.0.80
# scikit-image removed - let pip resolve it automatically via rembg dependency
# rembg for background removal with BiRefNet models (state-of-the-art)
# Using latest onnxruntime (1.17+ fixed executable stack issues)
onnxruntime>=1.17.0
rembg>=2.0.70
# SAM (Segment Anything) for smart object selection - runs locally, no API needed
# Using torch 2.4+ for numpy 2.x compatibility (required by scikit-image 0.26+)
torch>=2.4.0
torchvision>=0.19.0
torch==2.1.2
torchvision==0.16.2
segment-anything @ git+https://github.com/facebookresearch/segment-anything.git
# NOTE: rembg (background removal) disabled due to dependency conflicts
# rembg>=2.0.70 requires:
# - scikit-image>=0.26.0 which requires numpy>=2.0
# - Pillow>=12.1.0
# But opencv-python-headless 4.9.0.80 requires numpy<2.0
# To enable rembg, need to update opencv-python-headless to 4.10+ (numpy 2.x compatible)
# and update all dependent packages accordingly