Fix ci (#99)
* Fix ci * fix GPG key error in docker * minor fix * minor fix * minor fix * minor fix * minor fix * minor fixpull/97/head
parent
a9e1eb5fea
commit
ad63b27af7
|
@ -49,8 +49,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install Pillow
|
- name: Install Pillow
|
||||||
run: pip install Pillow==6.2.2
|
run: python -m pip install Pillow==6.2.2
|
||||||
if: ${{matrix.torchvision == '0.4.2'}}
|
if: ${{matrix.torchvision < 0.5}}
|
||||||
- name: Install PyTorch
|
- name: Install PyTorch
|
||||||
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
|
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
|
||||||
- name: Install MMCV
|
- name: Install MMCV
|
||||||
|
@ -69,13 +69,12 @@ jobs:
|
||||||
coverage xml
|
coverage xml
|
||||||
coverage report -m
|
coverage report -m
|
||||||
|
|
||||||
build_cuda:
|
build_cuda101:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-18.04
|
||||||
|
container:
|
||||||
env:
|
image: pytorch/pytorch:1.6.0-cuda10.1-cudnn7-devel
|
||||||
CUDA: 10.1.105-1
|
env:
|
||||||
CUDA_SHORT: 10.1
|
LANG: C.UTF-8
|
||||||
UBUNTU_VERSION: ubuntu1804
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.7]
|
python-version: [3.7]
|
||||||
|
@ -109,31 +108,27 @@ jobs:
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install CUDA
|
- name: Fetch GPG keys
|
||||||
run: |
|
run: |
|
||||||
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
|
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
|
||||||
wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
|
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
|
||||||
sudo dpkg -i ${INSTALLER}
|
- name: Install system dependencies
|
||||||
wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
|
run: apt-get update && apt-get install -y libgl1-mesa-glx libglib2.0-0 libsm6 libxrender-dev libxext6
|
||||||
sudo apt-key add 7fa2af80.pub
|
|
||||||
sudo apt update -qq
|
|
||||||
sudo apt install -y cuda-${CUDA_SHORT/./-} cuda-cufft-dev-${CUDA_SHORT/./-}
|
|
||||||
sudo apt clean
|
|
||||||
export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
|
|
||||||
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH}
|
|
||||||
export PATH=${CUDA_HOME}/bin:${PATH}
|
|
||||||
- name: Install Pillow
|
- name: Install Pillow
|
||||||
run: pip install Pillow==6.2.2
|
run: python -m pip install Pillow==6.2.2
|
||||||
if: ${{matrix.torchvision < 0.5}}
|
if: ${{matrix.torchvision < 0.5}}
|
||||||
|
- name: Install python-dev
|
||||||
|
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev
|
||||||
|
if: ${{matrix.python-version != '3.9'}}
|
||||||
- name: Install PyTorch
|
- name: Install PyTorch
|
||||||
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
|
run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
|
||||||
- name: Install MMCV
|
- name: Install mmfewshot dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch${{matrix.mmcv}}/index.html
|
python -V
|
||||||
pip install -r requirements.txt
|
python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch${{matrix.mmcv}}/index.html
|
||||||
|
python -m pip install -r requirements.txt
|
||||||
python -c 'import mmcv; print(mmcv.__version__)'
|
python -c 'import mmcv; print(mmcv.__version__)'
|
||||||
- name: Install MMCLS and MMDET
|
python -m pip install mmcls mmdet
|
||||||
run: pip install mmcls mmdet
|
|
||||||
- name: Build and install
|
- name: Build and install
|
||||||
run: |
|
run: |
|
||||||
rm -rf .eggs
|
rm -rf .eggs
|
||||||
|
@ -174,6 +169,10 @@ jobs:
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- name: Fetch GPG keys
|
||||||
|
run: |
|
||||||
|
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
|
||||||
|
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
|
||||||
# Add ppa source repo for python3.9.
|
# Add ppa source repo for python3.9.
|
||||||
- name: Add python3.9 source
|
- name: Add python3.9 source
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -8,6 +8,10 @@ ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0+PTX"
|
||||||
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
|
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
|
||||||
ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"
|
ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"
|
||||||
|
|
||||||
|
# To fix GPG key error when running apt-get update
|
||||||
|
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
|
||||||
|
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 \
|
RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
Loading…
Reference in New Issue