Commit 86ac7762 authored by rusty1s's avatar rusty1s
Browse files

conda build

parent 9049aa20
#!/bin/bash
TORCH_VERSION=$(python -c "import torch; print(torch.__version__)")
TORCH_VERSION=${TORCH_VERSION%+*}
TORCH_VERSION=${TORCH_VERSION%.*}
CUDA_VERSION=$(python -c "import torch; print(torch.version.cuda)")
export CONDA_PYTORCH_CONSTRAINT="pytorch==$TORCH_VERSION.*"
export TORCH_VERSION="$TORCH_VERSION.0"
if [[ "$(uname)" == Darwin ]]; then
export CONDA_CUDATOOLKIT_CONSTRAINT=""
export CUDA_VERSION="cpu"
export FORCE_ONLY_CPU=1
elif [ "${CUDA_VERSION}" = "None" ]; then
export CONDA_CUDATOOLKIT_CONSTRAINT="cpuonly"
export CUDA_VERSION="cpu"
export FORCE_ONLY_CPU=1
else
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit==$CUDA_VERSION.*"
export CUDA_VERSION="cu${CUDA_VERSION/./}"
export FORCE_CUDA=1
fi
echo "PyTorch $TORCH_VERSION+$CUDA_VERSION:"
echo "$CONDA_PYTORCH_CONSTRAINT"
echo "$CONDA_CUDATOOLKIT_CONSTRAINT"
conda build . -c defaults -c nvidia -c pytorch
package:
name: torch-spline-conv
version: 1.1.1
source:
git_url: https://github.com/rusty1s/pytorch_spline_conv.git
requirements:
host:
- pip
- python
- numpy>=1.11
- {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }}
- {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }}
run:
- python
- numpy>=1.11
- {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }}
- {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }}
build:
string: py{{py}}_torch_{{ environ['TORCH_VERSION'] }}_{{ environ['CUDA_VERSION'] }}
script: pip install .
test:
imports:
- torch_spline_conv
about:
home: https://github.com/rusty1s/pytorch_spline_conv
license: MIT
summary: Implementation of the Spline-Based Convolution Operator of SplineCNN in PyTorch
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