Skip to content

Commit

Permalink
Cleanup Dockerfile-notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragjn committed Dec 2, 2024
1 parent b7ec4f1 commit 0e49c66
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions Dockerfile-notebook
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,18 @@ RUN apt update && \
apt update && \
apt install -y --no-install-recommends --allow-change-held-packages libnccl2 libnccl-dev

# Install torch
# Install torch and axolotl
USER jovyan
COPY requirements.txt notebook-requirements.txt /tmp/llm-finetune/
RUN pip install -U pip wheel setuptools && \
pip uninstall -y axolotl && \
pip install --no-cache-dir -U -r /tmp/llm-finetune/notebook-requirements.txt
MAX_JOBS=1 NVCC_APPEND_FLAGS="--threads 1" pip install --no-cache-dir -U --use-pep517 -r /tmp/llm-finetune/notebook-requirements.txt

# Setup editable packages
USER root
RUN mkdir -p /packages && \
chown -R jovyan:users /packages

# Install axolotl
USER jovyan
RUN cd /packages && \
git clone https://github.com/truefoundry/axolotl && \
cd axolotl/ && \
git checkout b8db5db0fea9a1dad15338c1daf73a04f647caf4 && \
cd /packages/axolotl/ && \
MAX_JOBS=1 NVCC_APPEND_FLAGS="--threads 1" pip install -U --use-pep517 --no-build-isolation --no-cache-dir -e .[flash-attn,mamba-ssm,optimizers,lion-pytorch,galore]

# Install axolotl_truefoundry plugin with our requirements overrides over axolotl
COPY --chown=jovyan:users plugins/axolotl_truefoundry /packages/axolotl_truefoundry
RUN cd /packages/axolotl_truefoundry/ && \
Expand Down

0 comments on commit 0e49c66

Please sign in to comment.