File size: 822 Bytes
c7d1de7
 
 
 
 
 
 
 
 
49f8d6d
3693eae
 
 
c7d1de7
 
 
 
 
 
 
 
 
 
 
 
 
feee9ed
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
# 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"]