Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	Update Dockerfile
Browse files- Dockerfile +23 -15
    	
        Dockerfile
    CHANGED
    
    | @@ -1,26 +1,34 @@ | |
| 1 | 
            -
            # Use Python 3.11 slim instead of 3.13
         | 
| 2 | 
             
            FROM python:3.11-slim
         | 
| 3 |  | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
                 | 
| 8 | 
            -
                curl \
         | 
| 9 | 
            -
                git \
         | 
| 10 | 
             
                && rm -rf /var/lib/apt/lists/*
         | 
| 11 |  | 
| 12 | 
            -
            #  | 
| 13 | 
            -
             | 
| 14 | 
            -
            COPY src/ ./src/
         | 
| 15 |  | 
| 16 | 
            -
            #  | 
| 17 | 
            -
             | 
| 18 |  | 
| 19 | 
             
            # Install Python dependencies
         | 
| 20 | 
            -
            RUN  | 
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
| 21 |  | 
|  | |
| 22 | 
             
            EXPOSE 8501
         | 
| 23 |  | 
| 24 | 
            -
             | 
|  | |
| 25 |  | 
| 26 | 
            -
             | 
|  | 
|  | |
|  | |
| 1 | 
             
            FROM python:3.11-slim
         | 
| 2 |  | 
| 3 | 
            +
            # Install system dependencies for audio processing
         | 
| 4 | 
            +
            RUN apt-get update && apt-get install -y --no-install-recommends \
         | 
| 5 | 
            +
                libsndfile1 \
         | 
| 6 | 
            +
                ffmpeg \
         | 
|  | |
|  | |
| 7 | 
             
                && rm -rf /var/lib/apt/lists/*
         | 
| 8 |  | 
| 9 | 
            +
            # Set working directory
         | 
| 10 | 
            +
            WORKDIR /app
         | 
|  | |
| 11 |  | 
| 12 | 
            +
            # Copy app files
         | 
| 13 | 
            +
            COPY . /app
         | 
| 14 |  | 
| 15 | 
             
            # Install Python dependencies
         | 
| 16 | 
            +
            RUN pip install --no-cache-dir -r requirements.txt
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            # Disable Streamlit usage stats to avoid permission issues with ~/.streamlit
         | 
| 19 | 
            +
            ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=0
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            # Set HOME to avoid root directory writes
         | 
| 22 | 
            +
            ENV HOME=/root
         | 
| 23 | 
            +
             | 
| 24 | 
            +
            # Create .streamlit dir if needed (though env var should suffice)
         | 
| 25 | 
            +
            RUN mkdir -p /root/.streamlit
         | 
| 26 |  | 
| 27 | 
            +
            # Expose Streamlit port
         | 
| 28 | 
             
            EXPOSE 8501
         | 
| 29 |  | 
| 30 | 
            +
            # Health check
         | 
| 31 | 
            +
            HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
         | 
| 32 |  | 
| 33 | 
            +
            # Run the app
         | 
| 34 | 
            +
            CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
         | 
