Spaces:
Build error
Build error
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +19 -0
Dockerfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Python 3.9 slim image
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy requirements and install dependencies
|
| 8 |
+
COPY backend_files/requirements.txt ./requirements.txt
|
| 9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
+
|
| 11 |
+
# Copy application code and model
|
| 12 |
+
COPY backend_files/app.py ./app.py
|
| 13 |
+
COPY backend_files/best_sales_forecast_model.joblib ./best_sales_forecast_model.joblib
|
| 14 |
+
|
| 15 |
+
# Expose port 7860 for the Flask API
|
| 16 |
+
EXPOSE 7860
|
| 17 |
+
|
| 18 |
+
# Run the Flask app
|
| 19 |
+
CMD ["python", "app.py"]
|