FROM python:3.11-slim # Set the working directory inside the container WORKDIR /app # Create the directory structure expected by the application RUN mkdir backend_files # Copy the necessary files into the backend_files directory inside the container # Copying from the root of the build context (where files were uploaded) COPY app.py backend_files/app.py COPY requirements.txt backend_files/requirements.txt COPY Superkart_Sales_prediction_model_v1_0.joblib backend_files/Superkart_Sales_prediction_model_v1_0.joblib # Install dependencies from the requirements file RUN pip install --no-cache-dir --upgrade -r backend_files/requirements.txt # Define the command to start the application using Gunicorn # It should reference the app within the backend_files directory CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "backend_files.app:Superkart_api"]