-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added ci to build tch geometric package
- Loading branch information
Showing
24 changed files
with
361 additions
and
73 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,112 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- ci | ||
jobs: | ||
wheel: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: | ||
- ubuntu-18.04 | ||
# - macos-10.15 | ||
# - windows-2019 | ||
# python-version: ['3.7', '3.8', '3.9', '3.10'] | ||
python-version: ['3.9'] | ||
torch-version: [1.11.0] | ||
# cuda-version: ['cpu', 'cu102', 'cu113', 'cu115'] | ||
# cuda-version: ['cu113'] | ||
cuda-version: ['cpu'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
default: true | ||
|
||
- name: Install CUDA ${{ matrix.cuda-version }} | ||
if: ${{ matrix.cuda-version != 'cpu' }} | ||
run: | | ||
bash .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}.sh | ||
- name: Install PyTorch ${{ matrix.torch-version }}+${{ matrix.cuda-version }} | ||
run: | | ||
pip install numpy typing-extensions dataclasses | ||
pip install --no-index --no-cache-dir torch==${{ matrix.torch-version}} -f https://download.pytorch.org/whl/${{ matrix.cuda-version }}/torch_stable.html | ||
python -c "import torch; print('PyTorch:', torch.__version__)" | ||
python -c "import torch; print('CUDA:', torch.version.cuda)" | ||
export PY_SITE_DIR=$(python -c "import site; print(site.getsitepackages()[0])") | ||
echo "LIBTORCH=$PY_SITE_DIR/torch" >> $GITHUB_ENV | ||
echo "LD_LIBRARY_PATH=$PY_SITE_DIR/torch/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | ||
- uses: messense/maturin-action@v1 | ||
with: | ||
manylinux: auto | ||
command: build | ||
args: --release -o dist | ||
env: | ||
LIBTORCH_CXX11_ABI: "0" | ||
|
||
- name: Upload wheels | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
# windows: | ||
# runs-on: windows-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: messense/maturin-action@v1 | ||
# with: | ||
# command: build | ||
# args: --release --no-sdist -o dist | ||
# - name: Upload wheels | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: wheels | ||
# path: dist | ||
# | ||
# macos: | ||
# runs-on: macos-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: messense/maturin-action@v1 | ||
# with: | ||
# command: build | ||
# args: --release --no-sdist -o dist --universal2 | ||
# - name: Upload wheels | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: wheels | ||
# path: dist | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
needs: [ wheel ] | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: wheels | ||
- name: Publish to PyPI | ||
uses: messense/maturin-action@v1 | ||
env: | ||
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | ||
with: | ||
command: upload | ||
args: --skip-existing * | ||
|
||
# act-CI-wheel |
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,8 @@ | ||
#!/bin/bash | ||
|
||
CUDA_HOME=/usr/local/cuda-10.1 | ||
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} | ||
PATH=${CUDA_HOME}/bin:${PATH} | ||
|
||
export FORCE_CUDA=1 | ||
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5" |
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,15 @@ | ||
#!/bin/bash | ||
|
||
OS=ubuntu1804 | ||
|
||
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin | ||
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 | ||
wget -nv https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-${OS}-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb | ||
sudo dpkg -i cuda-repo-${OS}-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb | ||
sudo apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pub | ||
|
||
sudo apt-get -qq update | ||
sudo apt install cuda-nvcc-10-1 cuda-libraries-dev-10-1 | ||
sudo apt clean | ||
|
||
rm -f https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-${OS}-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb |
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,8 @@ | ||
#!/bin/bash | ||
|
||
CUDA_HOME=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v10.1 | ||
PATH=${CUDA_HOME}/bin:$PATH | ||
PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/MSBuild/15.0/Bin:$PATH | ||
|
||
export FORCE_CUDA=1 | ||
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5" |
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,18 @@ | ||
#!/bin/bash | ||
|
||
# Install NVIDIA drivers, see: | ||
# https://github.com/pytorch/vision/blob/master/packaging/windows/internal/cuda_install.bat#L99-L102 | ||
curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq&export=download" --output "/tmp/gpu_driver_dlls.zip" | ||
7z x "/tmp/gpu_driver_dlls.zip" -o"/c/Windows/System32" | ||
|
||
export CUDA_SHORT=10.1 | ||
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}/Prod/local_installers/ | ||
export CUDA_FILE=cuda_${CUDA_SHORT}.243_426.00_win10.exe | ||
|
||
# Install CUDA: | ||
curl -k -L "${CUDA_URL}/${CUDA_FILE}" --output "${CUDA_FILE}" | ||
echo "" | ||
echo "Installing from ${CUDA_FILE}..." | ||
PowerShell -Command "Start-Process -FilePath \"${CUDA_FILE}\" -ArgumentList \"-s nvcc_${CUDA_SHORT} cuobjdump_${CUDA_SHORT} nvprune_${CUDA_SHORT} cupti_${CUDA_SHORT} cublas_dev_${CUDA_SHORT} cudart_${CUDA_SHORT} cufft_dev_${CUDA_SHORT} curand_dev_${CUDA_SHORT} cusolver_dev_${CUDA_SHORT} cusparse_dev_${CUDA_SHORT} npp_dev_${CUDA_SHORT} nvrtc_dev_${CUDA_SHORT} nvml_dev_${CUDA_SHORT}\" -Wait -NoNewWindow" | ||
echo "Done!" | ||
rm -f "${CUDA_FILE}" |
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,8 @@ | ||
#!/bin/bash | ||
|
||
CUDA_HOME=/usr/local/cuda-10.2 | ||
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} | ||
PATH=${CUDA_HOME}/bin:${PATH} | ||
|
||
export FORCE_CUDA=1 | ||
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5" |
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,15 @@ | ||
#!/bin/bash | ||
|
||
OS=ubuntu1804 | ||
|
||
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin | ||
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 | ||
wget -nv https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-${OS}-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb | ||
sudo dpkg -i cuda-repo-${OS}-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb | ||
sudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub | ||
|
||
sudo apt-get -qq update | ||
sudo apt install cuda-nvcc-10-2 cuda-libraries-dev-10-2 | ||
sudo apt clean | ||
|
||
rm -f https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-${OS}-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb |
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,8 @@ | ||
#!/bin/bash | ||
|
||
CUDA_HOME=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v10.2 | ||
PATH=${CUDA_HOME}/bin:$PATH | ||
PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/MSBuild/15.0/Bin:$PATH | ||
|
||
export FORCE_CUDA=1 | ||
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5" |
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,18 @@ | ||
#!/bin/bash | ||
|
||
# Install NVIDIA drivers, see: | ||
# https://github.com/pytorch/vision/blob/master/packaging/windows/internal/cuda_install.bat#L99-L102 | ||
curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq&export=download" --output "/tmp/gpu_driver_dlls.zip" | ||
7z x "/tmp/gpu_driver_dlls.zip" -o"/c/Windows/System32" | ||
|
||
export CUDA_SHORT=10.2 | ||
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}/Prod/local_installers | ||
export CUDA_FILE=cuda_${CUDA_SHORT}.89_441.22_win10.exe | ||
|
||
# Install CUDA: | ||
curl -k -L "${CUDA_URL}/${CUDA_FILE}" --output "${CUDA_FILE}" | ||
echo "" | ||
echo "Installing from ${CUDA_FILE}..." | ||
PowerShell -Command "Start-Process -FilePath \"${CUDA_FILE}\" -ArgumentList \"-s nvcc_${CUDA_SHORT} cuobjdump_${CUDA_SHORT} nvprune_${CUDA_SHORT} cupti_${CUDA_SHORT} cublas_dev_${CUDA_SHORT} cudart_${CUDA_SHORT} cufft_dev_${CUDA_SHORT} curand_dev_${CUDA_SHORT} cusolver_dev_${CUDA_SHORT} cusparse_dev_${CUDA_SHORT} npp_dev_${CUDA_SHORT} nvrtc_dev_${CUDA_SHORT} nvml_dev_${CUDA_SHORT}\" -Wait -NoNewWindow" | ||
echo "Done!" | ||
rm -f "${CUDA_FILE}" |
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,8 @@ | ||
#!/bin/bash | ||
|
||
CUDA_HOME=/usr/local/cuda-11.1 | ||
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} | ||
PATH=${CUDA_HOME}/bin:${PATH} | ||
|
||
export FORCE_CUDA=1 | ||
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6" |
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,15 @@ | ||
#!/bin/bash | ||
|
||
OS=ubuntu1804 | ||
|
||
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin | ||
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 | ||
wget -nv https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda-repo-${OS}-11-1-local_11.1.1-455.32.00-1_amd64.deb | ||
sudo dpkg -i cuda-repo-${OS}-11-1-local_11.1.1-455.32.00-1_amd64.deb | ||
sudo apt-key add /var/cuda-repo-${OS}-11-1-local/7fa2af80.pub | ||
|
||
sudo apt-get -qq update | ||
sudo apt install cuda-nvcc-11-1 cuda-libraries-dev-11-1 | ||
sudo apt clean | ||
|
||
rm -f https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda-repo-${OS}-11-1-local_11.1.1-455.32.00-1_amd64.deb |
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,8 @@ | ||
#!/bin/bash | ||
|
||
CUDA_HOME=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v11.1 | ||
PATH=${CUDA_HOME}/bin:$PATH | ||
PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/MSBuild/15.0/Bin:$PATH | ||
|
||
export FORCE_CUDA=1 | ||
export TORCH_CUDA_ARCH_LIST="6.0+PTX" |
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,18 @@ | ||
#!/bin/bash | ||
|
||
# Install NVIDIA drivers, see: | ||
# https://github.com/pytorch/vision/blob/master/packaging/windows/internal/cuda_install.bat#L99-L102 | ||
curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq&export=download" --output "/tmp/gpu_driver_dlls.zip" | ||
7z x "/tmp/gpu_driver_dlls.zip" -o"/c/Windows/System32" | ||
|
||
export CUDA_SHORT=11.1 | ||
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.1/local_installers | ||
export CUDA_FILE=cuda_${CUDA_SHORT}.1_456.81_win10.exe | ||
|
||
# Install CUDA: | ||
curl -k -L "${CUDA_URL}/${CUDA_FILE}" --output "${CUDA_FILE}" | ||
echo "" | ||
echo "Installing from ${CUDA_FILE}..." | ||
PowerShell -Command "Start-Process -FilePath \"${CUDA_FILE}\" -ArgumentList \"-s nvcc_${CUDA_SHORT} cuobjdump_${CUDA_SHORT} nvprune_${CUDA_SHORT} cupti_${CUDA_SHORT} cublas_dev_${CUDA_SHORT} cudart_${CUDA_SHORT} cufft_dev_${CUDA_SHORT} curand_dev_${CUDA_SHORT} cusolver_dev_${CUDA_SHORT} cusparse_dev_${CUDA_SHORT} npp_dev_${CUDA_SHORT} nvrtc_dev_${CUDA_SHORT} nvml_dev_${CUDA_SHORT}\" -Wait -NoNewWindow" | ||
echo "Done!" | ||
rm -f "${CUDA_FILE}" |
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,8 @@ | ||
#!/bin/bash | ||
|
||
CUDA_HOME=/usr/local/cuda-11.3 | ||
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} | ||
PATH=${CUDA_HOME}/bin:${PATH} | ||
|
||
export FORCE_CUDA=1 | ||
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6" |
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,15 @@ | ||
#!/bin/bash | ||
|
||
OS=ubuntu1804 | ||
|
||
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin | ||
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 | ||
wget -nv https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda-repo-${OS}-11-3-local_11.3.0-465.19.01-1_amd64.deb | ||
sudo dpkg -i cuda-repo-${OS}-11-3-local_11.3.0-465.19.01-1_amd64.deb | ||
sudo apt-key add /var/cuda-repo-${OS}-11-3-local/7fa2af80.pub | ||
|
||
sudo apt-get -qq update | ||
sudo apt install cuda-nvcc-11-3 cuda-libraries-dev-11-3 | ||
sudo apt clean | ||
|
||
rm -f https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda-repo-${OS}-11-3-local_11.3.0-465.19.01-1_amd64.deb |
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,8 @@ | ||
#!/bin/bash | ||
|
||
CUDA_HOME=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v11.3 | ||
PATH=${CUDA_HOME}/bin:$PATH | ||
PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/MSBuild/15.0/Bin:$PATH | ||
|
||
export FORCE_CUDA=1 | ||
export TORCH_CUDA_ARCH_LIST="6.0+PTX" |
Oops, something went wrong.