Spaces:
Running
Running
File size: 968 Bytes
e2d7515 1ec5369 e2d7515 1ec5369 e2d7515 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 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"]
|