FROM python:3.9-slim WORKDIR /app COPY requirements.txt requirements.txt RUN pip install -r requirements.txt COPY . . # Ensure the flask_session directory exists and has the correct permissions RUN mkdir -p /app/flask_session && chmod -R 777 /app/flask_session EXPOSE 7860 CMD ["python", "app.py"]