Skip to content

Commit

Permalink
210403
Browse files Browse the repository at this point in the history
  • Loading branch information
KumaTea committed Apr 5, 2021
1 parent 00284f4 commit 309dde9
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 5 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@ Backup link: `https://cf.ext.maku.ml/whl/stable.html`

---

`whl` list: [packages.txt](docker/packages-stdln.txt)
For development / testing wheels, please use this index:
**`https://ext.maku.ml/whl/dev.html`**

**`pip install <package> -f https://ext.maku.ml/whl/dev.html -f https://ext.maku.ml/whl/stable.html`**

---

`whl` list:
* [packages-stdln.txt](docker/packages-stdln.txt)
* [packages-deps.txt](docker/packages-deps.txt)
10 changes: 8 additions & 2 deletions docker/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

set -ex

# pip config set global.index-url https://mirrors.vmatrix.org.cn/pypi/web/simple
# deps

sed -i 's@http://deb.debian.org/debian@https://mirrors.matrix.moe/debian@g' /etc/apt/sources.list
sed -i 's@http://security.debian.org/debian-security@https://mirrors.matrix.moe/debian-security@g' /etc/apt/sources.list
apt update
apt install -y pkg-config libhdf5-dev
ln -s /usr/include/locale.h /usr/include/xlocale.h || :

if [ $(uname -m) = 'armv7l' ]; then
sed -i 's/scikit-learn//g' /root/packages-stdln.txt
Expand All @@ -11,7 +17,7 @@ fi
pip install -U -v -r /root/packages-stdln.txt -f https://ext.maku.ml/wheels.html -f https://torch.maku.ml/whl/stable.html

if [ $(uname -m) = 'aarch64' ]; then
pip install -U -v -r /root/packages-deps.txt -f https://ext.maku.ml/wheels.html -f https://torch.maku.ml/whl/stable.html
pip install -U -v -r /root/packages-deps.txt -f https://ext.maku.ml/wheels.html -f https://torch.maku.ml/whl/stable.html -f https://tf.maku.ml/whl/stable.html
fi

mkdir /root/whl
Expand Down
1 change: 1 addition & 0 deletions docker/packages-deps.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
fastai
fastbook
tensorflow
34 changes: 32 additions & 2 deletions src/gen_whl.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,20 @@
project = 'ext-whl'
whl_dir = '../whl'
whl_file = 'stable.html'
dev_file = 'dev.html'
gh_rl_api = 'https://api.github.com/repos/{author}/{project}/releases'

dev_packages = {
'numpy': {
'ver': ['1.20'],
'py': 'cp36'
},
'h5py': {
'ver': ['3.2'],
'py': 'cp36'
}
}


def get_gh_rl(author_name, project_name):
print('Fetching GitHub releases...')
Expand All @@ -33,7 +45,25 @@ def gen_index():
return rl_html


def pick_dev():
raw_html = gen_index()
packages_list = raw_html.splitlines()
dev_list = []
for package in dev_packages:
for item in packages_list:
if package in item:
for ver in dev_packages[package]['ver']:
if ver in item and dev_packages[package]['py'] in item:
dev_list.append(item)
packages_list.remove(item)
stable_html = '\n'.join(packages_list) + '\n'
dev_html = '\n'.join(dev_list) + '\n'
return stable_html, dev_html


if __name__ == '__main__':
html = gen_index()
stable, dev = pick_dev()
with open(f'{whl_dir}/{whl_file}', 'w', encoding='utf-8') as html_file:
html_file.write(html)
html_file.write(stable)
with open(f'{whl_dir}/{dev_file}', 'w', encoding='utf-8') as html_file:
html_file.write(dev)
3 changes: 3 additions & 0 deletions whl/dev.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/numpy-1.20.2-cp36-cp36m-linux_aarch64.whl">numpy-1.20.2-cp36-cp36m-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210330/numpy-1.20.2-cp36-cp36m-linux_armv7l.whl">numpy-1.20.2-cp36-cp36m-linux_armv7l.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/h5py-3.2.1-cp36-cp36m-linux_aarch64.whl">h5py-3.2.1-cp36-cp36m-linux_aarch64.whl</a><br>
13 changes: 13 additions & 0 deletions whl/stable.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/grpcio-1.36.1-cp36-cp36m-linux_aarch64.whl">grpcio-1.36.1-cp36-cp36m-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/grpcio-1.36.1-cp37-cp37m-linux_aarch64.whl">grpcio-1.36.1-cp37-cp37m-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/grpcio-1.36.1-cp38-cp38-linux_aarch64.whl">grpcio-1.36.1-cp38-cp38-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/grpcio-1.36.1-cp39-cp39-linux_aarch64.whl">grpcio-1.36.1-cp39-cp39-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/h5py-3.1.0-cp36-cp36m-linux_aarch64.whl">h5py-3.1.0-cp36-cp36m-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/h5py-3.2.1-cp37-cp37m-linux_aarch64.whl">h5py-3.2.1-cp37-cp37m-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/h5py-3.2.1-cp38-cp38-linux_aarch64.whl">h5py-3.2.1-cp38-cp38-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/h5py-3.2.1-cp39-cp39-linux_aarch64.whl">h5py-3.2.1-cp39-cp39-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/termcolor-1.1.0-py3-none-any.whl">termcolor-1.1.0-py3-none-any.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/wrapt-1.12.1-cp36-cp36m-linux_aarch64.whl">wrapt-1.12.1-cp36-cp36m-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/wrapt-1.12.1-cp37-cp37m-linux_aarch64.whl">wrapt-1.12.1-cp37-cp37m-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/wrapt-1.12.1-cp38-cp38-linux_aarch64.whl">wrapt-1.12.1-cp38-cp38-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210403/wrapt-1.12.1-cp39-cp39-linux_aarch64.whl">wrapt-1.12.1-cp39-cp39-linux_aarch64.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210330/numpy-1.20.2-cp37-cp37m-linux_armv7l.whl">numpy-1.20.2-cp37-cp37m-linux_armv7l.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210330/numpy-1.20.2-cp38-cp38-linux_armv7l.whl">numpy-1.20.2-cp38-cp38-linux_armv7l.whl</a><br>
<a href="https://github.com/KumaTea/ext-whl/releases/download/210330/numpy-1.20.2-cp39-cp39-linux_armv7l.whl">numpy-1.20.2-cp39-cp39-linux_armv7l.whl</a><br>
Expand Down

0 comments on commit 309dde9

Please sign in to comment.