Spaces:
Sleeping
Sleeping
Commit ·
5ea2e30
1
Parent(s): 1f552e9
Fix: Upgrade to PyTorch 2.5.1 to resolve compatibility issues
Browse files- Dockerfile +5 -8
Dockerfile
CHANGED
|
@@ -1,22 +1,19 @@
|
|
| 1 |
-
# Use
|
| 2 |
-
FROM pytorch/pytorch:2.
|
| 3 |
|
| 4 |
# Avoid prompts
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
|
| 7 |
-
# Install git
|
| 8 |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
-
# Upgrade pip
|
| 13 |
RUN pip install --no-cache-dir -U pip setuptools wheel
|
| 14 |
-
|
| 15 |
-
# Install Unsloth and training dependencies
|
| 16 |
-
# Using the recommended installation for standard environments
|
| 17 |
RUN pip install --no-cache-dir \
|
| 18 |
"unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git" \
|
| 19 |
-
trl \
|
| 20 |
peft \
|
| 21 |
accelerate \
|
| 22 |
bitsandbytes \
|
|
|
|
| 1 |
+
# Use PyTorch 2.5.1 to fix the 'torch.int1' and 'TrainingArguments' errors
|
| 2 |
+
FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
|
| 3 |
|
| 4 |
# Avoid prompts
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
|
| 7 |
+
# Install git and other system essentials
|
| 8 |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
+
# Upgrade pip and install core dependencies first
|
| 13 |
RUN pip install --no-cache-dir -U pip setuptools wheel
|
|
|
|
|
|
|
|
|
|
| 14 |
RUN pip install --no-cache-dir \
|
| 15 |
"unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git" \
|
| 16 |
+
"trl>=0.12.0" \
|
| 17 |
peft \
|
| 18 |
accelerate \
|
| 19 |
bitsandbytes \
|