* adding easy_context as integration for now * progress on ring attn impl * progress on ring attn impl * cleanup * remove errant file * fix req * removing unused code * updates * pytest * update * updates * fixes * precommit fixes * working multi-group SP * fixing sample packing * remove debug logs and simplify * eval dataloader and sampler changes * removing some obvious comments * update config.qmd and rename option * scoping down problematic import * another import scoping change * pernicious Fire CLI bugfix * isolate cli tests * actually isolate CLI tests * gracefully handle no ring-flash-attn * fix * fix * move ring flash attn to extras with flash-attn (#2414) * removing flash-attn from requirements.txt (in setup.py extras already) * rename file, delete another * using field validator instead of model validator * test fix * sampler / dataloader refactor * non-seq2se1 collator fix * removing print statement * bugfix * add SP doc, review comments * small changes * review comments, docstrings * refactors, SP mixin * small updates * fix tests * precommit * precommit --------- Co-authored-by: Wing Lian <wing.lian@gmail.com> Co-authored-by: Dan Saunders <dan@axolotl.ai>
53 lines
2.1 KiB
Django/Jinja
53 lines
2.1 KiB
Django/Jinja
FROM axolotlai/axolotl-base:{{ BASE_TAG }}
|
|
|
|
ENV TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6+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 libnccl2 libnccl-dev
|
|
|
|
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
|
|
|
|
# If AXOLOTL_EXTRAS is set, append it in brackets
|
|
RUN if [ "$NIGHTLY_BUILD" = "true" ] ; then \
|
|
sed -i 's#^transformers.*#transformers @ git+https://github.com/huggingface/transformers.git@main#' requirements.txt; \
|
|
sed -i 's#^peft.*#peft @ git+https://github.com/huggingface/peft.git@main#' requirements.txt; \
|
|
sed -i 's#^accelerate.*#accelerate @ git+https://github.com/huggingface/accelerate.git@main#' requirements.txt; \
|
|
sed -i 's#^trl.*#trl @ git+https://github.com/huggingface/trl.git@main#' requirements.txt; \
|
|
sed -i 's#^datasets.*#datasets @ git+https://github.com/huggingface/datasets.git@main#' requirements.txt; \
|
|
fi
|
|
|
|
RUN pip install packaging==23.2 setuptools==75.8.0
|
|
RUN if [ "$AXOLOTL_EXTRAS" != "" ] ; then \
|
|
pip install --no-build-isolation -e .[deepspeed,flash-attn,ring-flash-attn,optimizers,ray,$AXOLOTL_EXTRAS] $AXOLOTL_ARGS; \
|
|
else \
|
|
pip install --no-build-isolation -e .[deepspeed,flash-attn,ring-flash-attn,optimizers,ray] $AXOLOTL_ARGS; \
|
|
fi
|
|
|
|
RUN python scripts/unsloth_install.py | sh
|
|
RUN python scripts/cutcrossentropy_install.py | sh
|
|
|
|
# So we can test the Docker image
|
|
RUN pip install -r requirements-dev.txt -r requirements-tests.txt
|
|
|
|
# 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
|