deva8217 commited on
Commit
cb3caaa
·
verified ·
1 Parent(s): 583061d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -7
Dockerfile CHANGED
@@ -1,19 +1,22 @@
1
- # Use a slim Python image
2
  FROM python:3.9-slim
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Copy requirements and install
 
 
 
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # Copy app and model
12
  COPY app.py .
13
  COPY superkart_sales_forecast.pkl .
14
 
15
- # Expose the port Hugging Face requires
16
  EXPOSE 7860
17
 
18
- # Run the Flask app
19
- CMD ["python", "app.py"]
 
1
+ # Use a lightweight Python base image
2
  FROM python:3.9-slim
3
 
4
+ # Set working directory inside container
5
  WORKDIR /app
6
 
7
+ # Install system-level dependencies (for pandas, scikit-learn)
8
+ RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Copy and install Python dependencies
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy app code and trained model
15
  COPY app.py .
16
  COPY superkart_sales_forecast.pkl .
17
 
18
+ # Expose port expected by Hugging Face Spaces
19
  EXPOSE 7860
20
 
21
+ # Start the Flask app
22
+ CMD ["python", "app.py"]