CI: check docker requires (#12677)
* check docker requires * ci update * bagua * conda * cuda
This commit is contained in:
parent
3686778b89
commit
f9b69ce5b0
|
@ -52,9 +52,10 @@ jobs:
|
|||
|
||||
- bash: |
|
||||
python -c "fname = 'requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if 'horovod' not in line] ; open(fname, 'w').writelines(lines)"
|
||||
pip install fairscale==0.4.5
|
||||
pip install fairscale>=0.4.5
|
||||
pip install deepspeed>=0.6.0
|
||||
pip install bagua-cuda102==0.9.0
|
||||
CUDA_VERSION_MM=$(python -c "import torch ; print(''.join(map(str, torch.version.cuda.split('.')[:2])))")
|
||||
pip install "bagua-cuda$CUDA_VERSION_MM>=0.9.0"
|
||||
pip install . --requirement requirements/devel.txt
|
||||
pip list
|
||||
displayName: 'Install dependencies'
|
||||
|
|
|
@ -73,9 +73,10 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# the config used in '.azure-pipelines/gpu-tests.yml'
|
||||
python_version: ["3.7"]
|
||||
pytorch_version: ["1.8"]
|
||||
include:
|
||||
# the config used in '.azure-pipelines/gpu-tests.yml'
|
||||
- {python_version: "3.7", pytorch_version: "1.8"}
|
||||
- {python_version: "3.9", pytorch_version: "1.10"}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
|
|
@ -14,10 +14,10 @@ or with specific arguments
|
|||
```bash
|
||||
git clone <git-repository>
|
||||
docker image build \
|
||||
-t pytorch-lightning:base-cuda-py3.7-pt1.8 \
|
||||
-t pytorch-lightning:base-cuda-py3.9-pt1.10 \
|
||||
-f dockers/base-cuda/Dockerfile \
|
||||
--build-arg PYTHON_VERSION=3.7 \
|
||||
--build-arg PYTORCH_VERSION=1.8 \
|
||||
--build-arg PYTHON_VERSION=3.9 \
|
||||
--build-arg PYTORCH_VERSION=1.10 \
|
||||
.
|
||||
```
|
||||
|
||||
|
|
|
@ -147,6 +147,26 @@ RUN \
|
|||
pip install --no-cache-dir --global-option="--cuda_ext" https://github.com/NVIDIA/apex/archive/refs/heads/master.zip && \
|
||||
python -c "from apex import amp"
|
||||
|
||||
RUN \
|
||||
# install FairScale
|
||||
pip install fairscale==0.4.5 && \
|
||||
python -c "import fairscale; print(fairscale.__version__)"
|
||||
|
||||
RUN \
|
||||
# install DeepSpeed
|
||||
pip install deepspeed==0.6.0 && \
|
||||
python -c "import deepspeed; print(deepspeed.__version__)"
|
||||
|
||||
RUN \
|
||||
# install Bagua
|
||||
CUDA_VERSION_MM=$(python -c "print(''.join('$CUDA_VERSION'.split('.')[:2]))") && \
|
||||
pip install "bagua-cuda$CUDA_VERSION_MM==0.9.0" && \
|
||||
python -c "import bagua_core; bagua_core.install_deps()" && \
|
||||
python -c "import bagua; print(bagua.__version__)"
|
||||
|
||||
COPY requirements/check-avail-extras.py check-avail-extras.py
|
||||
COPY requirements/check-avail-strategies.py check-avail-strategies.py
|
||||
|
||||
RUN \
|
||||
# Show what we have
|
||||
pip --version && \
|
||||
|
@ -154,5 +174,6 @@ RUN \
|
|||
pip list && \
|
||||
python -c "import sys; ver = sys.version_info ; assert f'{ver.major}.{ver.minor}' == '$PYTHON_VERSION', ver" && \
|
||||
python -c "import torch; assert torch.__version__.startswith('$PYTORCH_VERSION'), torch.__version__" && \
|
||||
python -c "import horovod.torch" && \
|
||||
python -c "from horovod.torch import nccl_built; nccl_built()"
|
||||
python check-avail-extras.py && \
|
||||
python check-avail-strategies.py && \
|
||||
rm check-avail-*.py
|
||||
|
|
|
@ -76,7 +76,6 @@ RUN \
|
|||
pip install -q fire && \
|
||||
# Disable cache \
|
||||
CUDA_VERSION_MM=$(python -c "print(''.join('$CUDA_VERSION'.split('.')[:2]))") && \
|
||||
export BAGUA_CUDA_VERSION=$CUDA_VERSION_MM && \
|
||||
pip config set global.cache-dir false && \
|
||||
# set particular PyTorch version
|
||||
python ./requirements/adjust-versions.py requirements.txt ${PYTORCH_VERSION} && \
|
||||
|
@ -138,14 +137,25 @@ RUN \
|
|||
|
||||
RUN \
|
||||
# install DeepSpeed
|
||||
pip install deepspeed==0.5.7 && \
|
||||
pip install deepspeed==0.6.0 && \
|
||||
python -c "import deepspeed; print(deepspeed.__version__)"
|
||||
|
||||
RUN \
|
||||
# install Bagua
|
||||
CUDA_VERSION_MM=$(python -c "print(''.join('$CUDA_VERSION'.split('.')[:2]))") && \
|
||||
pip install "bagua-cuda$CUDA_VERSION_MM==0.9.0" && \
|
||||
python -c "import bagua_core; bagua_core.install_deps()" && \
|
||||
python -c "import bagua; print(bagua.__version__)"
|
||||
|
||||
COPY requirements/check-avail-extras.py check-avail-extras.py
|
||||
COPY requirements/check-avail-strategies.py check-avail-strategies.py
|
||||
|
||||
RUN \
|
||||
# Show what we have
|
||||
pip --version && \
|
||||
pip list && \
|
||||
python -c "import sys; ver = sys.version_info ; assert f'{ver.major}.{ver.minor}' == '$PYTHON_VERSION', ver" && \
|
||||
python -c "import torch; assert torch.__version__.startswith('$PYTORCH_VERSION'), torch.__version__" && \
|
||||
python -c "import horovod.torch" && \
|
||||
python -c "from horovod.torch import nccl_built; nccl_built()"
|
||||
python check-avail-extras.py && \
|
||||
python check-avail-strategies.py && \
|
||||
rm check-avail-*.py
|
||||
|
|
Loading…
Reference in New Issue