download_wheels.sh 695 Bytes
Newer Older
Casper's avatar
Casper committed
1
2
3
#!/bin/bash

# Set variables
Casper's avatar
Casper committed
4
AWQ_KERNELS_VERSION="0.0.6"
Casper's avatar
Casper committed
5
6
7
8
9
10
11
12
13
14
15
16
RELEASE_URL="https://api.github.com/repos/casper-hansen/AutoAWQ_kernels/releases/tags/v${AWQ_KERNELS_VERSION}"

# Create a directory to download the wheels
mkdir -p dist
cd dist

# Download all the wheel files from the GitHub release
# excluding ones with '+cu' (%2B is + but encoded)
curl -s $RELEASE_URL | \
    jq -r ".assets[].browser_download_url" | \
    grep '\.whl' | \
    grep -v '%2Bcu' | \
17
    grep -v '%2Brocm' | \
Casper's avatar
Casper committed
18
19
20
21
22
23
24
    xargs -n 1 -P 4 wget

# Rename the wheels from 'linux_x86_64' to 'manylinux_x86_64'
for file in *linux_x86_64.whl; do
    mv "$file" "$(echo $file | sed 's/linux_x86_64/manylinux2014_x86_64/')"
done

25
cd ..