* feat: move to uv first * fix: update doc to uv first * fix: merge dev/tests into uv pyproject * fix: update docker docs to match current config * fix: migrate examples to readme * fix: add llmcompressor to conflict * feat: rec uv sync with lockfile for dev/ci * fix: update docker docs to clarify how to use uv images * chore: docs * fix: use system python, no venv * fix: set backend cpu * fix: only set for installing pytorch step * fix: remove unsloth kernel and installs * fix: remove U in tests * fix: set backend in deps too * chore: test * chore: comments * fix: attempt to lock torch * fix: workaround torch cuda and not upgraded * fix: forgot to push * fix: missed source * fix: nightly upstream loralinear config * fix: nightly phi3 long rope not work * fix: forgot commit * fix: test phi3 template change * fix: no more requirements * fix: carry over changes from new requirements to pyproject * chore: remove lockfile per discussion * fix: set match-runtime * fix: remove unneeded hf hub buildtime * fix: duplicate cache delete on nightly * fix: torchvision being overridden * fix: migrate to uv images * fix: leftover from merge * fix: simplify base readme * fix: update assertion message to be clearer * chore: docs * fix: change fallback for cicd script * fix: match against main exactly * fix: peft 0.19.1 change * fix: e2e test * fix: ci * fix: e2e test
56 lines
2.2 KiB
Django/Jinja
56 lines
2.2 KiB
Django/Jinja
FROM axolotlai/axolotl-base-uv:{{ BASE_TAG }}
|
|
|
|
ENV TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 9.0+PTX"
|
|
ENV AXOLOTL_EXTRAS="{{ AXOLOTL_EXTRAS }}"
|
|
ENV AXOLOTL_ARGS="{{ AXOLOTL_ARGS }}"
|
|
ENV CUDA="{{ CUDA }}"
|
|
ENV PYTORCH_VERSION="{{ PYTORCH_VERSION }}"
|
|
ENV GITHUB_REF="{{ GITHUB_REF }}"
|
|
ENV GITHUB_SHA="{{ GITHUB_SHA }}"
|
|
ENV NIGHTLY_BUILD="{{ NIGHTLY_BUILD }}"
|
|
ENV HF_HOME="{{ HF_HOME }}"
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --allow-change-held-packages vim curl nano zstd libnccl2 libnccl-dev ibverbs-providers ibverbs-utils infiniband-diags librdmacm-dev librdmacm1 rdmacm-utils slurm-wlm
|
|
|
|
WORKDIR /workspace
|
|
|
|
RUN git clone --depth=1 https://github.com/axolotl-ai-cloud/axolotl.git
|
|
|
|
WORKDIR /workspace/axolotl
|
|
|
|
RUN git fetch origin +$GITHUB_REF && \
|
|
git checkout FETCH_HEAD
|
|
|
|
RUN uv pip install packaging==26.0 setuptools==78.1.1
|
|
RUN uv pip install torchvision
|
|
RUN uv pip uninstall causal_conv1d
|
|
RUN if [ "$AXOLOTL_EXTRAS" != "" ] ; then \
|
|
uv pip install --no-build-isolation -e .[deepspeed,flash-attn,ring-flash-attn,optimizers,ray,$AXOLOTL_EXTRAS] $AXOLOTL_ARGS; \
|
|
else \
|
|
uv pip install --no-build-isolation -e .[deepspeed,flash-attn,ring-flash-attn,optimizers,ray] $AXOLOTL_ARGS; \
|
|
fi
|
|
|
|
# Override with nightly HF packages for nightly builds
|
|
RUN if [ "$NIGHTLY_BUILD" = "true" ] ; then \
|
|
uv pip install --no-deps \
|
|
"transformers @ git+https://github.com/huggingface/transformers.git@main" \
|
|
"peft @ git+https://github.com/huggingface/peft.git@main" \
|
|
"accelerate @ git+https://github.com/huggingface/accelerate.git@main" \
|
|
"trl @ git+https://github.com/huggingface/trl.git@main" \
|
|
"datasets @ git+https://github.com/huggingface/datasets.git@main"; \
|
|
fi
|
|
|
|
RUN python scripts/cutcrossentropy_install.py --uv | sh
|
|
|
|
# So we can test the Docker image
|
|
RUN uv pip install black mypy pre-commit types-requests quartodoc jupyter blobfile tiktoken \
|
|
codecov codecov-cli pytest pytest-cov pytest-retry pytest-sugar pytest-xdist tbparse
|
|
|
|
# fix so that git fetch/pull from remote works
|
|
RUN git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && \
|
|
git config --get remote.origin.fetch
|
|
|
|
# helper for huggingface-login cli
|
|
RUN git config --global credential.helper store
|