File size: 646 Bytes
270b06d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use slim Python image
FROM python:3.9-slim

# Set working directory inside the container
WORKDIR /app

# Copy project files into the container
COPY . .

# Install dependencies and print package list to verify gunicorn is installed
RUN pip install --no-cache-dir --upgrade pip \
 && pip install --no-cache-dir -r requirements.txt \
 && echo "Installed packages:" \
 && pip list

# Expose the port Hugging Face expects
EXPOSE 7860

# Start the Flask app using gunicorn
# - app: refers to app.py
# - app: the Flask app object in app.py (corrected from rental_price_predictor_api)
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]