deva8217's picture
Update Dockerfile
cb3caaa verified
raw
history blame contribute delete
573 Bytes
# Use a lightweight Python base image
FROM python:3.9-slim
# Set working directory inside container
WORKDIR /app
# Install system-level dependencies (for pandas, scikit-learn)
RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code and trained model
COPY app.py .
COPY superkart_sales_forecast.pkl .
# Expose port expected by Hugging Face Spaces
EXPOSE 7860
# Start the Flask app
CMD ["python", "app.py"]