# Use official Python image FROM python:3.10 # Set working directory WORKDIR /app # Create .streamlit folder with permissions RUN mkdir -p /app/.streamlit && chmod -R 777 /app/.streamlit # Copy requirements and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy all project files COPY . . # Expose ports EXPOSE 8000 EXPOSE 7860 # Run both FastAPI and Streamlit properly CMD ["bash", "-c", "uvicorn backend.main:app --host 0.0.0.0 --port 8000 & streamlit run app.py --server.port 7860 --server.address 0.0.0.0 --server.headless true --browser.gatherUsageStats false"]