# Use an official Python runtime as a parent image FROM python:3.11 # Set the working directory in the container WORKDIR /app # Ensure logs directory exists and set proper permissions RUN mkdir -p /app/logs && chmod -R 777 /app/logs # Copy the application files COPY . . # Install dependencies RUN pip install -r requirements.txt # Expose the ports for FastAPI (8000) and Streamlit (8501) EXPOSE 8000 # Run FastAPI and Streamlit in parallel CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port 8000"]