Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
flash-attention
Commits
984d5204
Commit
984d5204
authored
Dec 29, 2022
by
Tri Dao
Browse files
Update training Dockerfile to use flash-attn==0.2.6
parent
02961717
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
training/Dockerfile
training/Dockerfile
+9
-10
No files found.
training/Dockerfile
View file @
984d5204
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# ARG COMPAT=0
# ARG COMPAT=0
ARG
PERSONAL=0
ARG
PERSONAL=0
# FROM nvidia/cuda:11.3.1-devel-ubuntu20.04 as base-0
# FROM nvidia/cuda:11.3.1-devel-ubuntu20.04 as base-0
FROM
nvcr.io/nvidia/pytorch:22.1
1
-py3 as base
FROM
nvcr.io/nvidia/pytorch:22.1
2
-py3 as base
ENV
HOST docker
ENV
HOST docker
ENV
LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV
LANG=C.UTF-8 LC_ALL=C.UTF-8
...
@@ -67,30 +67,29 @@ ENV PIP_NO_CACHE_DIR=1
...
@@ -67,30 +67,29 @@ ENV PIP_NO_CACHE_DIR=1
# RUN pip install --upgrade --force-reinstall --global-option="--cpp_ext" --global-option="--cuda_ext" --global-option="--fast_multihead_attn" --global-option="--fmha" --global-option="--fast_layer_norm" --global-option="--xentropy" git+https://github.com/NVIDIA/apex.git#egg=apex
# RUN pip install --upgrade --force-reinstall --global-option="--cpp_ext" --global-option="--cuda_ext" --global-option="--fast_multihead_attn" --global-option="--fmha" --global-option="--fast_layer_norm" --global-option="--xentropy" git+https://github.com/NVIDIA/apex.git#egg=apex
# xgboost conflicts with deepspeed
# xgboost conflicts with deepspeed
RUN
pip uninstall
-y
xgboost
&&
DS_BUILD_UTILS
=
1
DS_BUILD_FUSED_LAMB
=
1 pip
install
deepspeed
==
0.7.
5
RUN
pip uninstall
-y
xgboost
&&
DS_BUILD_UTILS
=
1
DS_BUILD_FUSED_LAMB
=
1 pip
install
deepspeed
==
0.7.
7
# General packages that we don't care about the version
# General packages that we don't care about the version
# zstandard to extract the_pile dataset
# zstandard to extract the_pile dataset
# psutil to get the number of cpu physical cores
# psutil to get the number of cpu physical cores
# twine to upload package to PyPI
# twine to upload package to PyPI
# ninja is broken for some reason, it returns error code 245
RUN
pip
install
pytest matplotlib jupyter ipython ipdb gpustat scikit-learn spacy munch einops opt_einsum fvcore gsutil cmake pykeops zstandard psutil h5py twine gdown
\
RUN
pip uninstall
-y
ninja
&&
pip
install
ninja
RUN
pip
install
pytest matplotlib jupyter ipython ipdb gpustat scikit-learn spacy munch einops opt_einsum fvcore gsutil cmake pykeops zstandard psutil h5py twine
\
&&
python
-m
spacy download en_core_web_sm
&&
python
-m
spacy download en_core_web_sm
# hydra
# hydra
RUN
pip
install
hydra-core
==
1.
2.0
hydra-colorlog
==
1.2.0 hydra-optuna-sweeper
==
1.2.0 pyrootutils rich
RUN
pip
install
hydra-core
==
1.
3.1
hydra-colorlog
==
1.2.0 hydra-optuna-sweeper
==
1.2.0 pyrootutils rich
# Core packages
# Core packages
RUN
pip
install
transformers
==
4.2
4.0
datasets
==
2.
7.1
pytorch-lightning
==
1.
7.7
triton
==
2.0.0.dev20221
1
20
wandb
==
0.13.
5
timm
==
0.6.12
torchmetrics
==
0.1
0.3
RUN
pip
install
transformers
==
4.2
5.1
datasets
==
2.
8.0
pytorch-lightning
==
1.
8.6
triton
==
2.0.0.dev2022120
2
wandb
==
0.13.
7
timm
==
0.6.12
torchmetrics
==
0.1
1.0
# For MLPerf
# For MLPerf
RUN
pip
install
git+https://github.com/mlcommons/logging.git@2.1.0
RUN
pip
install
git+https://github.com/mlcommons/logging.git@2.1.0
# Install FlashAttention
# Install FlashAttention
RUN
pip
install
flash-attn
==
0.2.
2
RUN
pip
install
flash-attn
==
0.2.
6.post
# Install CUDA extensions for cross-entropy, fused dense, layer norm
# Install CUDA extensions for cross-entropy, fused dense, layer norm
RUN
git clone https://github.com/HazyResearch/flash-attention
\
# Install CUDA extensions for cross-entropy, fused dense, layer norm
&&
cd
flash-attention
&&
git checkout v0.2.2
\
RUN git clone https://github.com/HazyResearch/flash-attention \
&& cd flash-attention && git checkout v0.2.6 \
&& cd csrc/fused_softmax && pip install . && cd ../../ \
&& cd csrc/fused_softmax && pip install . && cd ../../ \
&& cd csrc/rotary && pip install . && cd ../../ \
&& cd csrc/rotary && pip install . && cd ../../ \
&& cd csrc/xentropy && pip install . && cd ../../ \
&& cd csrc/xentropy && pip install . && cd ../../ \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment