File size: 871 Bytes
c944b0b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
29
FROM python:3.11-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    git \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements
COPY requirements_v5.txt requirements.txt

# Install Python dependencies
# Note: Some packages may fail - that's OK, script has fallbacks
RUN pip install --no-cache-dir torch transformers accelerate trl datasets huggingface_hub peft bitsandbytes optimum || \
    pip install --no-cache-dir torch transformers accelerate trl datasets huggingface_hub peft optimum

# Try to install IPEX (may fail on non-Intel)
RUN pip install --no-cache-dir intel_extension_for_pytorch || echo "IPEX not installed (non-Intel CPU)"

# Copy training script
COPY train_arithmetic_v5_ultimate.py .

# Set HF token from secret
ENV HF_TOKEN=${HF_TOKEN}

# Run training
CMD ["python", "train_arithmetic_v5_ultimate.py"]