DarkSting commited on
Commit
2a119a4
·
verified ·
1 Parent(s): dcd128b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -31
Dockerfile CHANGED
@@ -1,31 +1,31 @@
1
- FROM python:3.10-slim
2
-
3
- RUN apt-get update && apt-get install -y --no-install-recommends \
4
- build-essential \
5
- libgomp1 \
6
- && rm -rf /var/lib/apt/lists/*
7
-
8
- WORKDIR /app
9
-
10
- COPY requirements.txt requirements-yield.txt ./
11
-
12
- # Add huggingface_hub for downloading
13
- RUN pip install --no-cache-dir -r requirements.txt huggingface_hub
14
-
15
- # Only copy the app code — no model files
16
- COPY app.py ./
17
- COPY download_models.py ./
18
-
19
- RUN mkdir -p /app/uploads
20
-
21
- ENV PORT=5000 \
22
- TEA_ARTIFACT_DIR=/app/artifacts_tea_hybrid \
23
- TEA_DATA_PATH=/app/tea_auction_advanced_dataset.csv \
24
- TEA_MIN_ARIMA_POINTS=60 \
25
- HF_REPO_ID=your-username/your-repo-name \
26
- HF_TOKEN=""
27
-
28
- EXPOSE 5000
29
-
30
- # Download files first, then start the server
31
- CMD ["sh", "-c", "python download_models.py && gunicorn --bind 0.0.0.0:5000 --workers 2 --timeout 120 app:app"]
 
1
+ FROM python:3.10-slim
2
+
3
+ RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ build-essential \
5
+ libgomp1 \
6
+ && rm -rf /var/lib/apt/lists/*
7
+
8
+ WORKDIR /app
9
+
10
+ COPY requirements.txt requirements-yield.txt ./
11
+
12
+ # Add huggingface_hub for downloading
13
+ RUN pip install --no-cache-dir -r requirements.txt huggingface_hub
14
+
15
+ # Only copy the app code — no model files
16
+ COPY app.py ./
17
+ COPY download_models.py ./
18
+
19
+ RUN mkdir -p /app/uploads
20
+
21
+ ENV PORT=5000 \
22
+ TEA_ARTIFACT_DIR=/app/artifacts_tea_hybrid \
23
+ TEA_DATA_PATH=/app/tea_auction_advanced_dataset.csv \
24
+ TEA_MIN_ARIMA_POINTS=60 \
25
+ HF_REPO_ID=your-username/your-repo-name \
26
+ HF_TOKEN=""
27
+
28
+ EXPOSE 5000
29
+
30
+ # Download files first, then start the server
31
+ CMD ["sh", "-c", "huggingface.py && gunicorn --bind 0.0.0.0:5000 --workers 2 --timeout 120 app:app"]