You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: update-pytorch.sh
+47-22
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,51 @@ function checkCount() {
55
55
fi
56
56
}
57
57
58
+
functionupdateHumanIndexes() {
59
+
cat <<EOF > whl/index.html
60
+
<!DOCTYPE html>
61
+
<html>
62
+
<body>
63
+
<h1>Sonatype <a href="https://pytorch.org/">PyTorch</a> PyPI improved indexes for <a href="https://help.sonatype.com/en/pypi-repositories.html#download--search--and-install-packages-using-pip">Nexus Repository</a></h1>
64
+
65
+
Generated by <a href="https://github.com/sonatype-nexus-community/pytorch-pypi">sonatype-nexus-community/pytorch-pypi</a> from <a href="https://download.pytorch.org/whl/">https://download.pytorch.org/whl/</a>
66
+
<p>
67
+
for the full index, use <code>--index-url <a href="simple">https://sonatype-nexus-community.github.io/pytorch-pypi/whl/simple</code></a>
68
+
<p>
69
+
You can also use compute platform filtered indexes:
70
+
<ul>
71
+
$(for d in whl/*
72
+
do
73
+
d="$(echo $d| cut -c 5-)"
74
+
[ -d"whl/$d" ] && [ "$d"!="simple" ] \
75
+
&&echo"<li><a href=\"$d\">$d</a></li>"
76
+
done)
77
+
</ul>
78
+
</body>
79
+
</html>
80
+
EOF
81
+
82
+
fordin whl/*
83
+
do
84
+
d="$(echo $d| cut -c 5-)"
85
+
[ -d"whl/$d" ] && [ "$d"!="simple" ] \
86
+
&& cat <<EOF > whl/$d/index.html
87
+
<!DOCTYPE html>
88
+
<html>
89
+
<body>
90
+
<h1>Sonatype <a href="https://pytorch.org/">PyTorch</a> PyPI improved indexes for <a href="https://help.sonatype.com/en/pypi-repositories.html#download--search--and-install-packages-using-pip">Nexus Repository</a></h1>
91
+
92
+
Generated by <a href="https://github.com/sonatype-nexus-community/pytorch-pypi">sonatype-nexus-community/pytorch-pypi</a> from <a href="https://download.pytorch.org/whl/$d/">https://download.pytorch.org/whl/$d/</a>
93
+
<p>
94
+
for $d compute platform index, use <code>--index-url <a href="simple">https://sonatype-nexus-community.github.io/pytorch-pypi/whl/$d/simple</code></a>
95
+
<p>
96
+
see also <a href="..">other available indexes</a>
97
+
</body>
98
+
</html>
99
+
EOF
100
+
done
101
+
}
102
+
58
103
# update main PyTorch index, that contains everything, whatever the compute platform
59
104
updateIndex "whl"
60
105
@@ -65,6 +110,7 @@ git diff-index --name-status HEAD
65
110
if`git diff-index --quiet HEAD`
66
111
then
67
112
echo"no update found in PyTorch main index."
113
+
updateHumanIndexes
68
114
exit 0
69
115
fi
70
116
echo"updates found in PyTorch main index: updating also compute platform specific ones..."
@@ -77,30 +123,9 @@ for d in cpu cpu-cxx11-abi cpu_pypi_pkg cu118 cu121 cu124 rocm6.0 rocm6.1
77
123
do
78
124
updateIndex "whl/$d"
79
125
done
126
+
updateHumanIndexes
80
127
81
128
du -sh whl/*
82
129
83
130
fordin whl/simple whl/*/simple ;doecho"$(ls $d| wc -l | xargs)$d";done> summary.txt
Generated by <a href="https://github.com/sonatype-nexus-community/pytorch-pypi">sonatype-nexus-community/pytorch-pypi</a> from <a href="https://download.pytorch.org/whl/">https://download.pytorch.org/whl/</a>
0 commit comments