Spaces:
Sleeping
Sleeping
# Use an official Python runtime as a parent image | |
FROM python:3.10-slim | |
# Set environment variables | |
ENV PYTHONDONTWRITEBYTECODE 1 | |
ENV PYTHONUNBUFFERED 1 | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y \ | |
ffmpeg \ | |
libsndfile1 \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Set work directory | |
WORKDIR /app | |
# Copy app files | |
COPY . /app/ | |
# Install Python dependencies | |
RUN pip install --no-cache-dir --upgrade pip \ | |
&& pip install --no-cache-dir -r requirements.txt | |
# Expose port | |
EXPOSE 7860 | |
# Command to run the FastAPI app with Uvicorn | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |