Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	Upload Dockerfile
Browse files- Dockerfile +20 -21
    	
        Dockerfile
    CHANGED
    
    | @@ -1,21 +1,20 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
             | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
            COPY  | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
            EXPOSE 8501
         | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
            ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
         | 
|  | |
| 1 | 
            +
            # Use official Python image
         | 
| 2 | 
            +
            FROM python:3.10-slim
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            # Set working directory
         | 
| 5 | 
            +
            WORKDIR /app
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            # Copy requirements and install dependencies
         | 
| 8 | 
            +
            COPY requirements.txt ./
         | 
| 9 | 
            +
            RUN pip install --no-cache-dir -r requirements.txt
         | 
| 10 | 
            +
            RUN pip install fastapi uvicorn streamlit joblib
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            # Copy all project files
         | 
| 13 | 
            +
            COPY . .
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            # Expose ports for FastAPI and Streamlit
         | 
| 16 | 
            +
            EXPOSE 8000
         | 
| 17 | 
            +
            EXPOSE 8501
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            # Start both FastAPI and Streamlit using a process manager
         | 
| 20 | 
            +
            CMD ["bash", "-c", "uvicorn api:app --host 0.0.0.0 --port 8000 & streamlit run streamlit_app.py --server.port 8501 --server.address 0.0.0.0"]
         | 
|  | 
