Spaces:
Sleeping
Sleeping
Upload Dockerfile(1)
Browse files- Dockerfile(1) +20 -0
Dockerfile(1)
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /code
|
| 4 |
+
|
| 5 |
+
# Install system dependencies
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
build-essential \
|
| 8 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
+
# Install Python packages
|
| 11 |
+
RUN pip install --no-cache-dir flask gunicorn numpy pandas scikit-learn
|
| 12 |
+
|
| 13 |
+
# Copy application files
|
| 14 |
+
COPY . .
|
| 15 |
+
|
| 16 |
+
# Make sure the Models directory exists
|
| 17 |
+
RUN mkdir -p Models
|
| 18 |
+
|
| 19 |
+
# Run the application
|
| 20 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "main:app"]
|