fix install scripts (?)
This commit is contained in:
@@ -35,8 +35,8 @@ RUN if [ "$AXOLOTL_EXTRAS" != "" ] ; then \
|
|||||||
else \
|
else \
|
||||||
uv pip install --python "$VENV_PYTHON" --no-build-isolation -e .[ring-flash-attn,optimizers,ray] $AXOLOTL_ARGS; \
|
uv pip install --python "$VENV_PYTHON" --no-build-isolation -e .[ring-flash-attn,optimizers,ray] $AXOLOTL_ARGS; \
|
||||||
fi && \
|
fi && \
|
||||||
python scripts/unsloth_install.py | sh && \
|
"$VENV_PYTHON" scripts/unsloth_install.py | sh && \
|
||||||
python scripts/cutcrossentropy_install.py | sh && \
|
"$VENV_PYTHON" scripts/cutcrossentropy_install.py | sh && \
|
||||||
uv pip install --python "$VENV_PYTHON" pytest
|
uv pip install --python "$VENV_PYTHON" pytest
|
||||||
|
|
||||||
# fix so that git fetch/pull from remote works with shallow clone
|
# fix so that git fetch/pull from remote works with shallow clone
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import importlib.util
|
import importlib.util
|
||||||
import sys
|
import sys
|
||||||
|
from shlex import quote
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import torch
|
import torch
|
||||||
@@ -18,12 +19,14 @@ if v < V("2.4.0"):
|
|||||||
|
|
||||||
cce_spec = importlib.util.find_spec("cut_cross_entropy")
|
cce_spec = importlib.util.find_spec("cut_cross_entropy")
|
||||||
|
|
||||||
UNINSTALL_PREFIX = ""
|
python_path = quote(sys.executable)
|
||||||
if cce_spec:
|
|
||||||
if not importlib.util.find_spec("cut_cross_entropy.transformers"):
|
|
||||||
UNINSTALL_PREFIX = "uv pip uninstall --system cut-cross-entropy && "
|
|
||||||
|
|
||||||
print(
|
commands = []
|
||||||
UNINSTALL_PREFIX
|
if cce_spec and not importlib.util.find_spec("cut_cross_entropy.transformers"):
|
||||||
+ 'uv pip install --system "cut-cross-entropy[transformers] @ git+https://github.com/axolotl-ai-cloud/ml-cross-entropy.git@c6a32c5"'
|
commands.append(f"uv pip uninstall --python {python_path} cut-cross-entropy")
|
||||||
|
|
||||||
|
commands.append(
|
||||||
|
f'uv pip install --python {python_path} "cut-cross-entropy[transformers] @ git+https://github.com/axolotl-ai-cloud/ml-cross-entropy.git@c6a32c5"'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
print(" && ".join(commands))
|
||||||
|
|||||||
Reference in New Issue
Block a user