Spaces:
Runtime error
Runtime error
| # Use an official Python runtime as a parent image | |
| FROM python:3.9-slim | |
| # Set the working directory in the container | |
| WORKDIR /usr/src/app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy the current directory contents into the container | |
| COPY . . | |
| # Install any needed packages specified in requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Make port 7860 available to the world outside this container | |
| EXPOSE 7860 | |
| # Define environment variable for Streamlit | |
| ENV STREAMLIT_SERVER_PORT=7860 | |
| ENV STREAMLIT_SERVER_HEADLESS=true | |
| ENV STREAMLIT_SERVER_ENABLE_CORS=false | |
| # Run app.py when the container launches | |
| CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"] |