Spaces:
Running
Running
File size: 566 Bytes
c7c9999 b3cef24 c7c9999 b3cef24 c7c9999 b3cef24 c7c9999 b3cef24 c7c9999 a99301b b3cef24 c7c9999 a99301b |
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 |
# Base image
FROM python:3.10-slim
# Set environment variables to writable paths
ENV HF_HOME=/app/hf_cache
ENV MPLCONFIGDIR=/app/mpl_config
# Install OS packages
RUN apt-get update && \
apt-get install -y git ffmpeg libsndfile1 && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy dependency list and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose API port
EXPOSE 7860
# Run FastAPI
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |