Skip to content

Commit 4015319

Browse files
authored
Merge pull request #96 from CCInc/conda
Update conda wheel generation
2 parents 6975a41 + 75cb151 commit 4015319

36 files changed

+413
-41
lines changed

.github/workflows/building-conda.yml

Lines changed: 58 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,90 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [ubuntu-16.04, macos-10.15, windows-latest]
14-
python-version: [3.6, 3.7, 3.8, 3.9]
15-
torch-version: [1.8.0, 1.9.0]
16-
cuda-version: ['cpu', 'cu101', 'cu102', 'cu111']
13+
os: [ubuntu-18.04, macos-10.15] #, windows-2019]
14+
python-version: ['3.7', '3.8', '3.9'] #, '3.10']
15+
torch-version: [1.10.0, 1.11.0, 1.12.0]
16+
cuda-version: ['cpu', 'cu102', 'cu113', 'cu115', 'cu116']
1717
exclude:
18-
- torch-version: 1.9.0
19-
cuda-version: 'cu101'
20-
- os: macos-10.15
21-
cuda-version: 'cu101'
18+
- torch-version: 1.10.0
19+
cuda-version: 'cu116'
20+
- torch-version: 1.11.0
21+
cuda-version: 'cu116'
22+
- torch-version: 1.12.0
23+
cuda-version: 'cu115'
24+
- torch-version: 1.10.0
25+
cuda-version: 'cu115'
26+
- torch-version: 1.10.0
27+
python-version: '3.10'
28+
- os: windows-2019
29+
torch-version: 1.11.0
30+
cuda-version: 'cu102'
2231
- os: macos-10.15
2332
cuda-version: 'cu102'
2433
- os: macos-10.15
25-
cuda-version: 'cu111'
26-
- os: windows-latest
27-
cuda-version: 'cu101'
34+
cuda-version: 'cu113'
35+
- os: macos-10.15
36+
cuda-version: 'cu115'
37+
- os: macos-10.15
38+
cuda-version: 'cu116'
39+
- os: macos-10.15
40+
python-version: '3.10' # this is unhappy
41+
- os: ubuntu-18.04
42+
cuda-version: 'cu115'
43+
- os: windows-2019
44+
cuda-version: 'cu102'
45+
- os: windows-2019 # Complains about CUDA mismatch.
46+
python-version: '3.7'
2847

2948
steps:
3049
- uses: actions/checkout@v2
3150
- name: Set up Conda for Python ${{ matrix.python-version }}
3251
uses: conda-incubator/setup-miniconda@v2
3352
with:
3453
python-version: ${{ matrix.python-version }}
54+
55+
- name: Free up disk space
56+
if: ${{ runner.os == 'Linux' }}
57+
run: |
58+
sudo rm -rf /usr/share/dotnet
59+
60+
- name: Free up disk space
61+
if: ${{ runner.os == 'Linux' }}
62+
run: |
63+
sudo rm -rf /usr/share/dotnet
3564
3665
- name: Install Conda packages
3766
run: |
3867
conda install conda-build conda-verify --yes
3968
shell:
4069
bash -l {0}
4170

42-
- name: Build Conda package
71+
- name: Install CUDA ${{ matrix.cuda-version }}
72+
if: ${{ matrix.cuda-version != 'cpu' }}
73+
run: |
74+
bash .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}.sh
75+
shell:
76+
bash
77+
78+
- name: Build Conda package for CPU
79+
if: ${{ matrix.cuda-version == 'cpu' }}
80+
run: |
81+
FORCE_CUDA=0 TORCH_CUDA_ARCH_LIST=0 ./conda/torch-points-kernels/build_conda.sh ${{ matrix.python-version }} ${{ matrix.torch-version }} ${{ matrix.cuda-version }}
82+
shell:
83+
bash -l {0}
84+
85+
- name: Build Conda package for GPU
86+
if: ${{ matrix.cuda-version != 'cpu' }}
4387
run: |
88+
source .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}-env.sh
4489
./conda/torch-points-kernels/build_conda.sh ${{ matrix.python-version }} ${{ matrix.torch-version }} ${{ matrix.cuda-version }}
4590
shell:
4691
bash -l {0}
4792

4893
- name: Publish Conda package
4994
run: |
5095
conda install anaconda-client --yes
51-
anaconda upload --force --user torch-points3d --label main $HOME/conda-bld/*/*.tar.bz2
96+
anaconda upload --force --label main $HOME/conda-bld/*/*.tar.bz2
5297
env:
5398
ANACONDA_API_TOKEN: ${{ secrets.CONDA_TOKEN }}
5499
shell:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
CUDA_HOME=/usr/local/cuda-10.1
4+
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
5+
PATH=${CUDA_HOME}/bin:${PATH}
6+
7+
export FORCE_CUDA=1
8+
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
OS=ubuntu1804
4+
5+
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin
6+
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600
7+
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
8+
sudo dpkg -i cuda-repo-${OS}-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb
9+
sudo apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pub
10+
11+
sudo apt-get -qq update
12+
sudo apt install cuda-nvcc-10-1 cuda-libraries-dev-10-1
13+
sudo apt clean
14+
15+
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
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
CUDA_HOME=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v10.1
4+
PATH=${CUDA_HOME}/bin:$PATH
5+
PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/MSBuild/15.0/Bin:$PATH
6+
7+
export FORCE_CUDA=1
8+
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# Install NVIDIA drivers, see:
4+
# https://github.com/pytorch/vision/blob/master/packaging/windows/internal/cuda_install.bat#L99-L102
5+
curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq&export=download" --output "/tmp/gpu_driver_dlls.zip"
6+
7z x "/tmp/gpu_driver_dlls.zip" -o"/c/Windows/System32"
7+
8+
export CUDA_SHORT=10.1
9+
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}/Prod/local_installers/
10+
export CUDA_FILE=cuda_${CUDA_SHORT}.243_426.00_win10.exe
11+
12+
# Install CUDA:
13+
curl -k -L "${CUDA_URL}/${CUDA_FILE}" --output "${CUDA_FILE}"
14+
echo ""
15+
echo "Installing from ${CUDA_FILE}..."
16+
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"
17+
echo "Done!"
18+
rm -f "${CUDA_FILE}"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
CUDA_HOME=/usr/local/cuda-10.2
4+
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
5+
PATH=${CUDA_HOME}/bin:${PATH}
6+
7+
export FORCE_CUDA=1
8+
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
OS=ubuntu1804
4+
5+
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin
6+
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600
7+
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
8+
sudo dpkg -i cuda-repo-${OS}-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb
9+
sudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub
10+
11+
sudo apt-get -qq update
12+
sudo apt install cuda-nvcc-10-2 cuda-libraries-dev-10-2
13+
sudo apt clean
14+
15+
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
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
CUDA_HOME=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v10.2
4+
PATH=${CUDA_HOME}/bin:$PATH
5+
PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/MSBuild/15.0/Bin:$PATH
6+
7+
export FORCE_CUDA=1
8+
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# Install NVIDIA drivers, see:
4+
# https://github.com/pytorch/vision/blob/master/packaging/windows/internal/cuda_install.bat#L99-L102
5+
curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq&export=download" --output "/tmp/gpu_driver_dlls.zip"
6+
7z x "/tmp/gpu_driver_dlls.zip" -o"/c/Windows/System32"
7+
8+
export CUDA_SHORT=10.2
9+
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}/Prod/local_installers
10+
export CUDA_FILE=cuda_${CUDA_SHORT}.89_441.22_win10.exe
11+
12+
# Install CUDA:
13+
curl -k -L "${CUDA_URL}/${CUDA_FILE}" --output "${CUDA_FILE}"
14+
echo ""
15+
echo "Installing from ${CUDA_FILE}..."
16+
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"
17+
echo "Done!"
18+
rm -f "${CUDA_FILE}"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
CUDA_HOME=/usr/local/cuda-11.1
4+
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
5+
PATH=${CUDA_HOME}/bin:${PATH}
6+
7+
export FORCE_CUDA=1
8+
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6"

0 commit comments

Comments
 (0)