# Use official Python image FROM python:3.10-slim # Set working directory WORKDIR /app # Copy requirements and install dependencies COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt RUN pip install fastapi uvicorn streamlit joblib # Copy all project files COPY . . # Expose ports for FastAPI and Streamlit EXPOSE 8000 EXPOSE 8501 # Start both FastAPI and Streamlit using a process manager 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"]