Spaces:
Running
Running
| FROM python:3.10-slim | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| DEPLOYMENT_TARGET=huggingface \ | |
| LAMA_MODEL_SOURCE=huggingface \ | |
| LAMA_MODEL_REPO=Carve/LaMa-ONNX \ | |
| LAMA_MODEL_FILE=lama_fp32.onnx \ | |
| MIGAN_MODEL_SOURCE=url \ | |
| DEFAULT_MODE=fast \ | |
| LOAD_MODEL_ON_STARTUP=1 \ | |
| PRELOAD_WATERMARK_MODES=fast,quality \ | |
| OCR_WARMUP_ON_STARTUP=1 \ | |
| OCR_DEPLOY_PROFILE=rapidocr | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip \ | |
| && pip install torch==2.10.0+cpu --index-url https://download.pytorch.org/whl/cpu \ | |
| && pip install -r requirements.txt | |
| COPY app.py doubao_alpha.png ./ | |
| COPY services ./services | |
| COPY features ./features | |
| EXPOSE 7860 | |
| CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |