Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +11 -14
Dockerfile
CHANGED
|
@@ -1,22 +1,19 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
# keep CPU tiny runners stable
|
| 5 |
-
ENV OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 NUMEXPR_NUM_THREADS=1
|
| 6 |
-
# provide a default in case HF doesn't inject $PORT for any reason
|
| 7 |
-
ENV PORT=7860
|
| 8 |
-
|
| 9 |
-
ARG BUILD_ID=12
|
| 10 |
WORKDIR /app
|
| 11 |
|
|
|
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
COPY app.py
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
|
|
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
CMD ["
|
|
|
|
| 1 |
+
# Use a lightweight Python image
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
|
| 4 |
+
# Set the working directory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy the requirements file and install dependencies
|
| 8 |
COPY requirements.txt .
|
| 9 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
| 11 |
+
# Copy the application code and the trained model
|
| 12 |
+
COPY app.py .
|
| 13 |
+
COPY best_sales_forecasting_model.pkl .
|
| 14 |
|
| 15 |
+
# Expose the port the app runs on
|
| 16 |
+
EXPOSE 5000
|
| 17 |
|
| 18 |
+
# Command to run the application
|
| 19 |
+
CMD ["flask", "run", "--host=0.0.0.0", "--port=5000"]
|