Commit 25f66883 authored by rusty1s's avatar rusty1s
Browse files

[skip ci] build conda

parent 92b8a949
...@@ -10,7 +10,8 @@ jobs: ...@@ -10,7 +10,8 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [windows-latest] #[ubuntu-16.04] #, macos-10.15] #, windows-latest] os: [ubuntu-16.04, , macos-10.15] #, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
torch-version: [1.8.0, 1.9.0] torch-version: [1.8.0, 1.9.0]
cuda-version: ['cpu', 'cu101', 'cu102', 'cu111'] cuda-version: ['cpu', 'cu101', 'cu102', 'cu111']
exclude: exclude:
...@@ -27,12 +28,14 @@ jobs: ...@@ -27,12 +28,14 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Conda - name: Set up Conda for Python ${{ matrix.version }}
uses: conda-incubator/setup-miniconda@v2 uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Conda packages - name: Install Conda packages
run: | run: |
$CONDA/bin/conda install conda-build conda-verify anaconda-client --yes conda install conda-build conda-verify anaconda-client --yes
shell: shell:
bash bash
...@@ -46,7 +49,7 @@ jobs: ...@@ -46,7 +49,7 @@ jobs:
- name: Build Conda package for CPU - name: Build Conda package for CPU
if: ${{ matrix.cuda-version == 'cpu' }} if: ${{ matrix.cuda-version == 'cpu' }}
run: | run: |
FORCE_ONLY_CPU=1 ./conda/pytorch-spline-conv/build_conda.sh ${{ matrix.torch-version }} ${{ matrix.cuda-version }} FORCE_ONLY_CPU=1 ./conda/pytorch-spline-conv/build_conda.sh ${{ matrix.python-version }} ${{ matrix.torch-version }} ${{ matrix.cuda-version }}
shell: shell:
bash bash
...@@ -54,7 +57,7 @@ jobs: ...@@ -54,7 +57,7 @@ jobs:
if: ${{ matrix.cuda-version != 'cpu' }} if: ${{ matrix.cuda-version != 'cpu' }}
run: | run: |
source .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}-env.sh source .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}-env.sh
FORCE_CUDA=1 ./conda/pytorch-spline-conv/build_conda.sh ${{ matrix.torch-version }} ${{ matrix.cuda-version }} FORCE_CUDA=1 ./conda/pytorch-spline-conv/build_conda.sh ${{ matrix.python-version }} ${{ matrix.torch-version }} ${{ matrix.cuda-version }}
shell: shell:
bash bash
......
``` ```
CONDA=$HOME/.miniconda3 ./build_conda.sh 1.9.0 cu111 ./build_conda.sh 3.9 1.9.0 cu111 # python, pytorch and cuda version
``` ```
#!/bin/bash #!/bin/bash
export TORCH_VERSION=$1 export PYTHON_VERSION=$1
export CUDA_VERSION=$2 export TORCH_VERSION=$2
export CUDA_VERSION=$3
export CONDA_PYTORCH_CONSTRAINT="pytorch==${TORCH_VERSION%.*}.*" export CONDA_PYTORCH_CONSTRAINT="pytorch==${TORCH_VERSION%.*}.*"
...@@ -29,4 +30,4 @@ echo "PyTorch $TORCH_VERSION+$CUDA_VERSION" ...@@ -29,4 +30,4 @@ echo "PyTorch $TORCH_VERSION+$CUDA_VERSION"
echo "- $CONDA_PYTORCH_CONSTRAINT" echo "- $CONDA_PYTORCH_CONSTRAINT"
echo "- $CONDA_CUDATOOLKIT_CONSTRAINT" echo "- $CONDA_CUDATOOLKIT_CONSTRAINT"
"$CONDA/bin/conda" build . -c defaults -c nvidia -c pytorch --output-folder "$HOME/conda-bld/" conda build . -c defaults -c nvidia -c pytorch --output-folder "$HOME/conda-bld/"
...@@ -7,12 +7,12 @@ source: ...@@ -7,12 +7,12 @@ source:
requirements: requirements:
host: host:
- python - python {{ environ.get('PYTHON_VERSION') }}
- {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }} - {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }}
- {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }} - {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }}
run: run:
- python - python {{ environ.get('PYTHON_VERSION') }}
- {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }} - {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }}
- {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }} - {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment