FROM python:3.10-slim WORKDIR /code COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy all code, including templates and static folders COPY . . # Create uploads directory and set permissions for both uploads and prediction history RUN mkdir -p /code/uploads && \ touch /code/prediction_history.json && \ chmod 777 /code/uploads && \ chmod 777 /code/prediction_history.json EXPOSE 7860 ENV FLASK_APP=app.py CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]