Spaces:
Sleeping
Sleeping
File size: 709 Bytes
1024e04 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg \
&& rm -rf /var/lib/apt/lists/*
RUN useradd --create-home --uid 1000 app
WORKDIR /app
ARG TORCH_INDEX_URL=https://download.pytorch.org/whl/cpu
RUN pip install --no-cache-dir torch==2.6.0 torchvision==0.21.0 --index-url ${TORCH_INDEX_URL}
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=app:app . .
USER app
ENV HOME=/home/app PYTHONUNBUFFERED=1 HF_HOME=/home/app/.cache/huggingface \
SYNTAX_MODEL_CACHE=/home/app/.cache/cardiosyntax SYNTAX_DEVICE=cpu
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--no-access-log"]
|