FROM python:3.9-slim WORKDIR /app # Ensure we have the latest pip RUN pip install --upgrade pip # Copy only the requirements file first to leverage Docker cache COPY requirements.txt . # Install dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application code COPY . . ENV PYTHONUNBUFFERED=1 EXPOSE 8501 EXPOSE 8004 # Start monitor, feedback server, and streamlit CMD ["sh", "-c", "python monitor.py & uvicorn trading_twins.manager:app --host 0.0.0.0 --port 8004 --reload --log-level debug & streamlit run app.py --server.port=8501 --server.address=0.0.0.0"]