Spaces:
Running
Running
# Use the official Python slim image as the base | |
FROM python:3.11-slim | |
# Set the working directory in the container | |
WORKDIR /app | |
# Copy the application files into the container | |
COPY app.py . | |
COPY requirements.txt . | |
COPY .streamlit/config.toml . | |
# Create .streamlit directory and move config.toml to it | |
RUN mkdir -p /root/.streamlit && mv config.toml /root/.streamlit/config.toml | |
# Install system dependencies required for edge-tts and other libraries | |
RUN apt-get update && apt-get install -y \ | |
libsndfile1 \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install Python dependencies from requirements.txt | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Expose the port Streamlit uses | |
EXPOSE 8501 | |
# Command to run the Streamlit app | |
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] |