Spaces:
Sleeping
Sleeping
File size: 760 Bytes
43301f7 6371b37 43301f7 aaa944c efebc5f 81d7d82 43301f7 6371b37 43301f7 6371b37 43301f7 6371b37 43301f7 6371b37 4bde5af 43301f7 9f9d74d |
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 |
FROM python:3.12-slim
# Set environment variables to prevent Python from writing pyc files to disk
# and to force stdout and stderr streams to be unbuffered
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
gcc \
libasound-dev \
portaudio19-dev \
&& rm -rf /var/lib/apt/lists/*
# Create and set the working directory
WORKDIR /app
# Copy the requirements.txt file and install the Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Expose the port that the FastAPI app runs on
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |