Spaces:
Runtime error
Runtime error
File size: 1,003 Bytes
e91a68d 44ae209 e91a68d 44ae209 e91a68d 44ae209 5de1f52 | 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 36 37 38 39 40 41 42 43 | FROM python:3.12-slim-bookworm
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
HF_HOME=/opt/models \
TRANSFORMERS_CACHE=/opt/models \
HUGGINGFACE_HUB_CACHE=/opt/models
WORKDIR /code
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
wget \
curl \
libsndfile1 \
ffmpeg \
gcc \
g++ \
build-essential \
python3-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Pre-download model
RUN python - <<PYEOF
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="LiquidAI/LFM2.5-Audio-1.5B",
local_dir="/opt/models/LiquidAI/LFM2.5-Audio-1.5B",
local_dir_use_symlinks=False
)
print("Model downloaded successfully.")
PYEOF
COPY . .
EXPOSE 7860
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |