Spaces:
Sleeping
Sleeping
File size: 632 Bytes
474728b 2cdd6eb 96bd691 474728b 2cdd6eb 474728b 2cdd6eb 474728b 2cdd6eb 474728b 2cdd6eb 474728b 2cdd6eb 474728b 2cdd6eb 96bd691 2cdd6eb 9b71e61 474728b 2cdd6eb |
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 |
# 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"] |