-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
v-chen_data
committed
Sep 24, 2024
1 parent
d85c83b
commit 13ef205
Showing
2 changed files
with
65 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2022 MosaicML LLM Foundry authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
ARG BASE_IMAGE | ||
FROM $BASE_IMAGE | ||
|
||
ARG BRANCH_NAME | ||
ARG TE_COMMIT | ||
|
||
ENV TORCH_CUDA_ARCH_LIST="8.0 8.6 8.7 8.9 9.0" | ||
|
||
# Check for changes in setup.py. | ||
# If there are changes, the docker cache is invalidated and a fresh pip installation is triggered. | ||
ADD https://raw.githubusercontent.com/mosaicml/llm-foundry/$BRANCH_NAME/setup.py setup.py | ||
RUN rm setup.py | ||
|
||
# Install TransformerEngine | ||
RUN NVTE_FRAMEWORK=pytorch CMAKE_BUILD_PARALLEL_LEVEL=4 MAX_JOBS=4 pip install git+https://github.com/NVIDIA/TransformerEngine.git@$TE_COMMIT | ||
|
||
# Install and uninstall foundry to cache foundry requirements | ||
RUN git clone -b $BRANCH_NAME https://github.com/mosaicml/llm-foundry.git | ||
RUN pip install --no-cache-dir "./llm-foundry[all]" | ||
RUN pip uninstall -y llm-foundry |