-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADLR/megatron-lm!2137 - ci: Enable dev container for new features
- Loading branch information
Showing
5 changed files
with
93 additions
and
1 deletion.
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
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,62 @@ | ||
# syntax=docker/dockerfile:1.3-labs | ||
|
||
ARG FROM_IMAGE_NAME | ||
FROM $FROM_IMAGE_NAME as build_causal_conv1d | ||
WORKDIR /opt | ||
RUN CAUSAL_CONV1D_FORCE_BUILD=TRUE pip3 wheel -v git+https://github.com/Dao-AILab/[email protected] | ||
|
||
FROM $FROM_IMAGE_NAME as build_grouped_gemm | ||
WORKDIR /opt | ||
RUN pip3 wheel -v git+https://github.com/fanshiqing/[email protected] | ||
|
||
FROM $FROM_IMAGE_NAME as build_mamba_ssm | ||
WORKDIR /opt | ||
RUN MAMBA_FORCE_BUILD=TRUE pip3 wheel -v git+https://github.com/state-spaces/[email protected] | ||
|
||
FROM $FROM_IMAGE_NAME as main | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends gettext python3-venv && \ | ||
apt-get clean && \ | ||
python -m venv /opt/jet && \ | ||
wget https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_amd64 -O /usr/local/bin/yq && \ | ||
chmod a+x /usr/local/bin/yq | ||
|
||
COPY --from=build_causal_conv1d /opt/causal_conv1d-1.2.2.post1-cp310-cp310-linux_x86_64.whl ./ | ||
COPY --from=build_grouped_gemm /opt/grouped_gemm-1.1.2-cp310-cp310-linux_x86_64.whl ./ | ||
COPY --from=build_mamba_ssm /opt/mamba_ssm-2.0.3-cp310-cp310-linux_x86_64.whl ./ | ||
|
||
RUN pip3 install --no-cache-dir --upgrade-strategy only-if-needed -v \ | ||
einops \ | ||
flask-restful \ | ||
nltk \ | ||
pytest \ | ||
pytest-cov \ | ||
pytest_mock \ | ||
pytest-random-order \ | ||
sentencepiece \ | ||
wrapt \ | ||
zarr \ | ||
wandb \ | ||
triton==2.1.0 \ | ||
causal_conv1d-1.2.2.post1-cp310-cp310-linux_x86_64.whl \ | ||
mamba_ssm-2.0.3-cp310-cp310-linux_x86_64.whl \ | ||
grouped_gemm-1.1.2-cp310-cp310-linux_x86_64.whl \ | ||
tensorstore==0.1.45 && \ | ||
rm *.whl | ||
|
||
# Since megatron does not have any dependencies (and isn't a dependency to any other package), we can install it separately to make everything a bit quicker | ||
COPY . /opt/megatron-lm | ||
RUN pip install /opt/megatron-lm | ||
ENV PYTHONPATH="/opt/megatron-lm:$PYTHONPATH" | ||
|
||
##### For NVIDIANS only ##### | ||
FROM main as jet | ||
ARG CACHEBUST=0 | ||
RUN --mount=type=secret,id=JET_INDEX_URLS \ | ||
JET_INDEX_URLS=$(cat /run/secrets/JET_INDEX_URLS) && \ | ||
pip install jet-client --upgrade $JET_INDEX_URLS && \ | ||
/opt/jet/bin/pip install jet-api --upgrade $JET_INDEX_URLS | ||
ENV PATH="$PATH:/opt/jet/bin" | ||
### |
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