Ani-404 Cursor commited on
Commit
181e438
·
1 Parent(s): 19478c8

use CPU-only torch and slim runtime deps for reliable Space build

Browse files
Files changed (3) hide show
  1. Dockerfile +5 -2
  2. requirements-dev.txt +6 -0
  3. requirements.txt +0 -0
Dockerfile CHANGED
@@ -8,9 +8,12 @@ ENV STREAMLIT_CONFIG_DIR=/tmp/.streamlit
8
  ENV TRANSFORMERS_CACHE=/tmp/.cache
9
  ENV HF_HOME=/tmp/.cache/huggingface
10
 
11
- # Copy requirements and install dependencies
 
 
12
  COPY requirements.txt .
13
- RUN pip install --no-cache-dir -r requirements.txt
 
14
 
15
  # Copy application files
16
  COPY . .
 
8
  ENV TRANSFORMERS_CACHE=/tmp/.cache
9
  ENV HF_HOME=/tmp/.cache/huggingface
10
 
11
+ # Copy requirements and install dependencies.
12
+ # Install CPU-only torch first (Spaces are CPU); avoids pulling multi-GB CUDA
13
+ # wheels that overflow the build disk.
14
  COPY requirements.txt .
15
+ RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu && \
16
+ pip install --no-cache-dir -r requirements.txt
17
 
18
  # Copy application files
19
  COPY . .
requirements-dev.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Extra dependencies for the offline finance pipeline (finance/run_pipeline.py)
2
+ # and model training (finance/train_finbert.py). Not needed by the deployed app.
3
+ -r requirements.txt
4
+ scikit-learn>=1.3.0
5
+ xgboost>=1.7.0
6
+ datasets>=2.14.0
requirements.txt CHANGED
Binary files a/requirements.txt and b/requirements.txt differ