fix typo and add apex

This commit is contained in:
Wing Lian
2023-05-07 11:48:47 -04:00
parent 3f11b47488
commit 21b74397de

View File

@@ -51,8 +51,15 @@ RUN git clone https://github.com/microsoft/DeepSpeed.git && \
FROM base-builder
# recompile apex
RUN python3 -m pip uninstall -y apex
RUN git clone https://github.com/NVIDIA/apex
# `MAX_JOBS=1` disables parallel building to avoid cpu memory OOM when building image on GitHub Action (standard) runners
RUN cd apex && MAX_JOBS=1 python3 -m pip install --global-option="--cpp_ext" --global-option="--cuda_ext" --no-cache -v --disable-pip-version-check .
RUN mkdir /workspace/wheels
COPY --from=deepspeed-builder /workspace/DeepSpeed/dist/deepspeed-*.whl wheels
COPY --from=flash-attn-builder /workspace/flash-attention/dist/flash_attn-*.whl wheels
RUN pip3 install.sh wheels/deepspeed-*.whl wheels/flash_attn-*.whl
RUN pip3 install wheels/deepspeed-*.whl wheels/flash_attn-*.whl
RUN git lfs install --skip-repo