Skip to content

Commit 9346a98

Browse files
authored
Create build.sh
1 parent 660d016 commit 9346a98

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

build.sh

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
current_path=$(pwd)
2+
conda_path=$HOME/miniconda3/envs
3+
4+
for dir in pytorch_cluster pytorch_scatter pytorch_sparse pytorch_spline_conv
5+
do
6+
(
7+
cd "${current_path}/$dir"
8+
${conda_path}/py39/bin/python setup.py bdist_wheel &
9+
${conda_path}/py310/bin/python setup.py bdist_wheel
10+
) &
11+
done
12+
13+
wait
14+
15+
for dir in pytorch_cluster pytorch_scatter pytorch_sparse pytorch_spline_conv
16+
do
17+
(
18+
cd "${current_path}/$dir"
19+
${conda_path}/py311/bin/python setup.py bdist_wheel &
20+
${conda_path}/py312/bin/python setup.py bdist_wheel
21+
) &
22+
done
23+
24+
wait
25+
26+
for dir in pytorch_cluster pytorch_scatter pytorch_sparse pytorch_spline_conv
27+
do
28+
(
29+
cd "${current_path}/$dir"
30+
${conda_path}/py38/bin/python setup.py bdist_wheel
31+
) &
32+
done
33+
34+
wait
35+
36+
if [ -d ${current_path}/dist ]; then
37+
rm -rf ${current_path}/dist
38+
fi
39+
mkdir ${current_path}/dist
40+
41+
package_name="torch-2.4-rocm-6.1"
42+
43+
versions=("py38" "py39" "py310" "py311" "py312")
44+
45+
for version in "${versions[@]}"; do
46+
mkdir -p ${current_path}/dist/${package_name}-${version}-linux_x86_64
47+
48+
for module in "pytorch_cluster" "pytorch_scatter" "pytorch_sparse" "pytorch_spline_conv"; do
49+
mv ${current_path}/${module}/dist/*-cp${version: -2}-cp${version: -2}-linux_x86_64.whl ${current_path}/dist/${package_name}-${version}-linux_x86_64/
50+
done
51+
52+
zip ${current_path}/dist/${package_name}-${version}-linux_x86_64.zip ${current_path}/dist/${package_name}-${version}-linux_x86_64/*.whl
53+
done
54+
55+
for module in "pytorch_cluster" "pytorch_scatter" "pytorch_sparse" "pytorch_spline_conv"; do
56+
rm -rf ${current_path}/${module}/dist
57+
rm -rf ${current_path}/${module}/build
58+
done
59+
60+
61+
wget "https://files.pythonhosted.org/packages/03/9f/157e913626c1acfb3b19ce000b1a6e4e4fb177c0bc0ea0c67ca5bd714b5a/torch_geometric-2.6.1-py3-none-any.whl" -O "${current_path}/dist/torch_geometric-2.6.1-py3-none-any.whl"
62+
63+
for version in "${versions[@]}"; do
64+
cp ${current_path}/dist/torch_geometric-2.6.1-py3-none-any.whl ${current_path}/dist/${package_name}-${version}-linux_x86_64/
65+
zip ${current_path}/dist/${package_name}-${version}-linux_x86_64.zip ${current_path}/dist/${package_name}-${version}-linux_x86_64/*.whl
66+
done
67+
68+
rm ${current_path}/dist/torch_geometric-2.6.1-py3-none-any.whl

0 commit comments

Comments
 (0)