# Use the official Python base image FROM python:3.9-slim # Set the working directory inside the container WORKDIR /app # Copy the requirements file to the working directory COPY requirements.txt . # Install the required packages RUN pip install --no-cache-dir -r requirements.txt # Copy the Flask app code to the working directory COPY app.py . # Expose the port on which the app will run EXPOSE 5000 # Set the environment variable for Flask ENV FLASK_APP=app.py # Run the Flask app CMD ["flask", "run", "--host=0.0.0.0", "--port", "7860"]