-
-
Notifications
You must be signed in to change notification settings - Fork 780
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dockerfile for tests with proper checkout
- Loading branch information
Showing
3 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
ARG BASE_TAG=main-base | ||
FROM winglian/axolotl-base:$BASE_TAG | ||
|
||
ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6+PTX" | ||
ARG AXOLOTL_EXTRAS="" | ||
ARG CUDA="118" | ||
ENV BNB_CUDA_VERSION=$CUDA | ||
ARG PYTORCH_VERSION="2.0.1" | ||
ARG GITHUB_REF="main" | ||
|
||
ENV PYTORCH_VERSION=$PYTORCH_VERSION | ||
|
||
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/OpenAccess-AI-Collective/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 [ "$AXOLOTL_EXTRAS" != "" ] ; then \ | ||
pip install -e .[deepspeed,flash-attn,$AXOLOTL_EXTRAS]; \ | ||
else \ | ||
pip install -e .[deepspeed,flash-attn]; \ | ||
fi | ||
|
||
# So we can test the Docker image | ||
RUN pip install pytest | ||
|
||
# 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 |