# Base Image FROM python:3.10 # Set environment variables ENV PYTHONUNBUFFERED=1 # Set working directory WORKDIR /app # Copy all project files COPY . /app # Install dependencies RUN pip install --upgrade pip && \ pip install fastapi uvicorn streamlit pandas torch transformers scikit-learn faiss-cpu # Expose both ports EXPOSE 7860 8000 # Run FastAPI and Streamlit together CMD uvicorn app:app --host 0.0.0.0 --port 8000 & \ streamlit run streamlit_app.py --server.port 7860 --server.address 0.0.0.0