Merge pull request #34 from outis1one/claude/migrate-to-minipaint-eYKWf

Fix rembg/onnxruntime Docker build issue
This commit is contained in:
Outis
2026-01-27 09:14:23 -05:00
committed by GitHub
2 changed files with 6 additions and 9 deletions
+4 -7
View File
@@ -39,13 +39,10 @@ RUN apt-get update && apt-get install -y \
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Fix onnxruntime executable stack issue in containers
# This clears the executable stack requirement from the onnxruntime library
RUN execstack -c /usr/local/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-311-x86_64-linux-gnu.so || true
# Pre-download rembg model (u2net) to avoid first-run delay
# Note: This downloads the U2-Net model (~170MB) during build
RUN python -c "from rembg import remove; print('rembg model downloaded')"
# Try to pre-download rembg model, but don't fail build if onnxruntime has issues
# (onnxruntime can have executable stack issues in some Docker environments)
# If this fails, Remove Background feature will be disabled
RUN python -c "from rembg import remove; print('rembg ready')" || echo "WARNING: rembg not available - Remove Background will be disabled"
# Copy backend application
COPY backend/ .
+2 -2
View File
@@ -14,8 +14,8 @@ pydantic-settings==2.1.0
email-validator==2.1.0
opencv-python-headless==4.9.0.80
scikit-image==0.22.0
# rembg for background removal - use onnxruntime 1.15.1 to avoid executable stack issue
onnxruntime==1.15.1
# rembg for background removal - use onnxruntime 1.14.1 to avoid executable stack issue in Docker
onnxruntime==1.14.1
rembg==2.0.50
# SAM (Segment Anything) for smart object selection - runs locally, no API needed
torch==2.1.2