Spaces:
Sleeping
Sleeping
File size: 1,122 Bytes
8b92d51 | 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 30 31 32 33 34 35 36 37 38 39 40 | FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir --upgrade pip
# Step 1: Install unsloth first (it pulls the torch version it wants)
RUN pip install --no-cache-dir \
"unsloth @ git+https://github.com/unslothai/unsloth.git" \
unsloth_zoo \
xformers
# Step 2: Now install torchvision to match whatever torch unsloth installed
RUN pip install --no-cache-dir --upgrade torchvision
# Step 3: Install TRL + training deps
RUN pip install --no-cache-dir \
"trl>=0.18.2,<=0.24.0" \
"peft>=0.18.0" \
"accelerate>=0.34.1" \
"bitsandbytes>=0.45.5" \
"datasets>=3.4.1" \
"transformers>=4.51.3" \
"huggingface_hub>=0.34.0" \
sentencepiece \
hf_transfer \
torchao \
triton
# Step 4: Install openenv for environment stepping
RUN pip install --no-cache-dir openenv-core
# Copy project code
COPY . /app/stack_doctor/
ENV PYTHONPATH="/app/stack_doctor:$PYTHONPATH"
CMD ["python", "/app/stack_doctor/training/train_stack_doctor.py"]
|