Spaces:
Runtime error
Runtime error
| # Use an official Python runtime as a parent image | |
| FROM python:3.9-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Copy the content of the uploaded directory (which are the files from deployment_files) into the container's /app directory | |
| COPY . /app | |
| # Set the working directory to /app where the files are located | |
| WORKDIR /app | |
| # Install any needed packages specified in requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Expose the port the app runs on | |
| EXPOSE 5000 | |
| # Run the application using Gunicorn | |
| # The command looks for 'product_sales_api' within the 'app' module | |
| CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:product_sales_api"] | |