Merge pull request #39 from outis1one/claude/fix-editmaskwithai-build-q8A5W
Disable rembg to fix build - numpy version conflict
This commit is contained in:
+1
-4
@@ -2,7 +2,7 @@ FROM python:3.11-slim
|
|||||||
|
|
||||||
WORKDIR /app
|
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 \
|
RUN apt-get update && apt-get install -y \
|
||||||
libgl1 \
|
libgl1 \
|
||||||
libglib2.0-0 \
|
libglib2.0-0 \
|
||||||
@@ -20,9 +20,6 @@ COPY requirements.txt .
|
|||||||
# Install Python dependencies
|
# Install Python dependencies
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
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 application
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
|||||||
+12
-10
@@ -1,8 +1,8 @@
|
|||||||
fastapi==0.109.0
|
fastapi==0.109.0
|
||||||
uvicorn[standard]==0.27.0
|
uvicorn[standard]==0.27.0
|
||||||
python-multipart==0.0.6
|
python-multipart==0.0.6
|
||||||
Pillow>=12.1.0,<13.0.0
|
Pillow>=10.0.0,<11.0.0
|
||||||
# numpy version will be resolved by pip based on torch/rembg requirements
|
numpy<2.0.0
|
||||||
sqlalchemy==2.0.25
|
sqlalchemy==2.0.25
|
||||||
python-jose[cryptography]==3.3.0
|
python-jose[cryptography]==3.3.0
|
||||||
passlib[bcrypt]==1.7.4
|
passlib[bcrypt]==1.7.4
|
||||||
@@ -13,13 +13,15 @@ pydantic==2.5.3
|
|||||||
pydantic-settings==2.1.0
|
pydantic-settings==2.1.0
|
||||||
email-validator==2.1.0
|
email-validator==2.1.0
|
||||||
opencv-python-headless==4.9.0.80
|
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
|
# 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.1.2
|
||||||
torch>=2.4.0
|
torchvision==0.16.2
|
||||||
torchvision>=0.19.0
|
|
||||||
segment-anything @ git+https://github.com/facebookresearch/segment-anything.git
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user