FROM python:3.10-slim WORKDIR /app # Install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application files COPY . . # Generate enriched data and train model RUN python augment_data.py RUN python train_model.py EXPOSE 7860 # Space requirement: host must be 0.0.0.0 and port 7860 ENV FLASK_APP=app.py CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]