download_wheels.sh 906 Bytes
Newer Older
1
2
#!/bin/bash

Casper's avatar
Casper committed
3
4
5
6
# Set variables
AWQ_VERSION="0.1.6"
CUDA_VERSION="cu1180"
RELEASE_URL="https://api.github.com/repos/casper-hansen/AutoAWQ/releases/tags/v${AWQ_VERSION}"
7
8
9
10
11
12
13
14

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

# Download all the wheel files from the GitHub release
curl -s $RELEASE_URL | \
    jq -r ".assets[].browser_download_url" | \
Casper's avatar
Casper committed
15
16
    grep '\.whl' | \
    grep "$CUDA_VERSION" | \
17
18
19
    xargs -n 1 wget

# Rename the wheels from 'linux_x86_64' to 'manylinux_x86_64'
Casper's avatar
Casper committed
20
21
22
23
24
25
26
27
28
# Remove CUDA version from filename
for file in *"$CUDA_VERSION"*.whl; do
    # First, rename the platform from 'linux_x86_64' to 'manylinux2014_x86_64'
    intermediate_name=$(echo "$file" | sed 's/linux_x86_64/manylinux2014_x86_64/')
    
    # Then, remove the CUDA version from the filename
    newname=$(echo "$intermediate_name" | sed "s/+${CUDA_VERSION}//")
    
    mv -v "$file" "$newname"
29
30
done

Casper's avatar
Casper committed
31

32
cd ..