File size: 690 Bytes
d5b7ee9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM python:3.11-slim

WORKDIR /app

RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

# Install dependencies
COPY requirements.txt .
# Add safetensors, huggingface_hub, scikit-learn explicitly just in case
RUN pip install --no-cache-dir -r requirements.txt \
    safetensors huggingface_hub scikit-learn pandas numpy torch yfinance

# Copy project files
COPY . .

# Environment variables (to be set in HF Space Secrets)
ENV HF_HOME=/tmp/huggingface
ENV HF_REPO_ID=""
ENV HF_TOKEN=""

# Command to run training
# This will output the performance report and upload to HF Hub
CMD ["python", "scripts/train_ai_model.py"]