Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-spline-conv
Commits
eb2daddf
Commit
eb2daddf
authored
Jun 25, 2021
by
rusty1s
Browse files
[skip ci] build conda
parent
86ac7762
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
29 deletions
+89
-29
.github/workflows/building-conda.yml
.github/workflows/building-conda.yml
+43
-0
conda/pytorch-spline-conv/build_conda.sh
conda/pytorch-spline-conv/build_conda.sh
+46
-0
conda/pytorch-spline-conv/meta.yaml
conda/pytorch-spline-conv/meta.yaml
+0
-0
conda/torch-spline-conv/build_conda.sh
conda/torch-spline-conv/build_conda.sh
+0
-29
No files found.
.github/workflows/building-conda.yml
0 → 100644
View file @
eb2daddf
name
:
Building Conda
on
:
[
workflow_dispatch
]
jobs
:
conda-build
:
runs-on
:
${{ matrix.os }}
strategy
:
fail-fast
:
false
matrix
:
os
:
[
ubuntu-16.04
]
python-version
:
[
3.8
]
torch-version
:
[
1.8.0
,
1.9.0
]
cuda-version
:
[
'
cpu'
,
'
cu101'
,
'
cu102'
,
'
cu111'
]
exclude
:
-
torch-version
:
1.9.0
cuda-version
:
'
cu101'
-
os
:
macos-10.15
cuda-version
:
'
cu101'
-
os
:
macos-10.15
cuda-version
:
'
cu102'
-
os
:
macos-10.15
cuda-version
:
'
cu111'
-
os
:
windows-latest
cuda-version
:
'
cu101'
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Set up conda with Python ${{ matrix.python-version }}
-
uses
:
conda-incubator/setup-miniconda@v2
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Install CUDA ${{ matrix.cuda-version }}
if
:
${{ matrix.cuda-version != 'cpu' }}
run
:
|
bash .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}.sh
-
name
:
Build conda package
run
:
|
bash .conda/pytorch-spline-conv/build_conda.sh ${{ matrix.torch-version }} ${{ matrix.cuda-version }}
conda/pytorch-spline-conv/build_conda.sh
0 → 100755
View file @
eb2daddf
#!/bin/bash
export
TORCH_VERSION
=
$1
export
CUDA_VERSION
=
$2
export
CONDA_PYTORCH_CONSTRAINT
=
"pytorch==
${
TORCH_VERSION
%.*
}
.*"
if
[
"
${
CUDA_VERSION
}
"
=
"cpu"
]
;
then
export
FORCE_ONLY_CPU
=
1
export
CONDA_CUDATOOLKIT_CONSTRAINT
=
"cpuonly"
else
export
FORCE_CUDA
=
1
case
$CUDA_VERSION
in
cu112
)
export
CONDA_CUDATOOLKIT_CONSTRAINT
=
"cudatoolkit==11.2.*"
;;
cu111
)
export
CONDA_CUDATOOLKIT_CONSTRAINT
=
"cudatoolkit==11.1.*"
;;
cu110
)
export
CONDA_CUDATOOLKIT_CONSTRAINT
=
"cudatoolkit==11.0.*"
;;
cu102
)
export
CONDA_CUDATOOLKIT_CONSTRAINT
=
"cudatoolkit==10.2.*"
;;
cu101
)
export
CONDA_CUDATOOLKIT_CONSTRAINT
=
"cudatoolkit==10.1.*"
;;
cu100
)
export
CONDA_CUDATOOLKIT_CONSTRAINT
=
"cudatoolkit==10.0.*"
;;
cu92
)
export
CONDA_CUDATOOLKIT_CONSTRAINT
=
"cudatoolkit==9.2.*"
;;
*
)
echo
"Unrecognized CUDA_VERSION=
$CUDA_VERSION
"
exit
1
;;
esac
fi
echo
"PyTorch
$TORCH_VERSION
+
$CUDA_VERSION
"
echo
"-
$CONDA_PYTORCH_CONSTRAINT
"
echo
"-
$CONDA_CUDATOOLKIT_CONSTRAINT
"
conda build
.
-c
defaults
-c
nvidia
-c
pytorch
conda/torch-spline-conv/meta.yaml
→
conda/
py
torch-spline-conv/meta.yaml
View file @
eb2daddf
File moved
conda/torch-spline-conv/build_conda.sh
deleted
100755 → 0
View file @
86ac7762
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment