Remove torchao entirely - transformers handles absence gracefully
Browse files- Dockerfile +5 -5
Dockerfile
CHANGED
|
@@ -31,16 +31,16 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 31 |
# 2. PyTorch 2.6.0 + CUDA 12.1
|
| 32 |
RUN pip install --no-cache-dir torch==2.6.0 --extra-index-url https://download.pytorch.org/whl/cu121
|
| 33 |
|
| 34 |
-
# 3.
|
| 35 |
-
RUN pip install --no-cache-dir torchao==0.8.0
|
| 36 |
-
|
| 37 |
-
# 4. Training deps (no unsloth here)
|
| 38 |
COPY --chown=user requirements-training.txt .
|
| 39 |
RUN pip install --no-cache-dir -r requirements-training.txt
|
| 40 |
|
| 41 |
-
#
|
| 42 |
RUN pip install --no-cache-dir --no-deps unsloth==2025.11.1 unsloth_zoo
|
| 43 |
|
|
|
|
|
|
|
|
|
|
| 44 |
# --- App code ---
|
| 45 |
COPY --chown=user src/ /app/src/
|
| 46 |
COPY --chown=user training/ /app/training/
|
|
|
|
| 31 |
# 2. PyTorch 2.6.0 + CUDA 12.1
|
| 32 |
RUN pip install --no-cache-dir torch==2.6.0 --extra-index-url https://download.pytorch.org/whl/cu121
|
| 33 |
|
| 34 |
+
# 3. Training deps (no unsloth here)
|
|
|
|
|
|
|
|
|
|
| 35 |
COPY --chown=user requirements-training.txt .
|
| 36 |
RUN pip install --no-cache-dir -r requirements-training.txt
|
| 37 |
|
| 38 |
+
# 4. Unsloth --no-deps (avoids torchao>=0.13 conflict)
|
| 39 |
RUN pip install --no-cache-dir --no-deps unsloth==2025.11.1 unsloth_zoo
|
| 40 |
|
| 41 |
+
# 5. Remove torchao if pulled in (incompatible with torch 2.6, crashes transformers)
|
| 42 |
+
RUN pip uninstall -y torchao 2>/dev/null; true
|
| 43 |
+
|
| 44 |
# --- App code ---
|
| 45 |
COPY --chown=user src/ /app/src/
|
| 46 |
COPY --chown=user training/ /app/training/
|