Commit 23cef1f5 authored by rusty1s's avatar rusty1s
Browse files

update install

parent 0a4a5579
...@@ -80,7 +80,7 @@ deploy: ...@@ -80,7 +80,7 @@ deploy:
edge: true edge: true
access_key_id: AKIAJB7S6NJ5OM5MAAGA access_key_id: AKIAJB7S6NJ5OM5MAAGA
secret_access_key: ${S3_SECRET_ACCESS_KEY} secret_access_key: ${S3_SECRET_ACCESS_KEY}
bucket: pytorch-sparse bucket: pytorch-geometric.com
local_dir: dist/torch-${TORCH_VERSION} local_dir: dist/torch-${TORCH_VERSION}
upload_dir: whl/torch-${TORCH_VERSION} upload_dir: whl/torch-${TORCH_VERSION}
acl: public_read acl: public_read
......
...@@ -29,12 +29,11 @@ Note that only `value` comes with autograd support, as `index` is discrete and t ...@@ -29,12 +29,11 @@ Note that only `value` comes with autograd support, as `index` is discrete and t
### Binaries ### Binaries
We provide pip wheels for all major OS/PyTorch/CUDA combinations, see [here](http://pytorch-sparse.s3-website.eu-central-1.amazonaws.com/whl). We provide pip wheels for all major OS/PyTorch/CUDA combinations, see [here](https://s3.eu-central-1.amazonaws.com/pytorch-geometric.com/whl/index.html).
To install from binaries, simply run To install from binaries, simply run
``` ```
pip install torch-scatter==latest+${CUDA} -f http://pytorch-scatter.s3-website.eu-central-1.amazonaws.com/whl/torch-1.4.0.html --trusted-host pytorch-scatter.s3-website.eu-central-1.amazonaws.com pip install torch-scatter==latest+${CUDA} torch-sparse==latest+${CUDA} -f https://s3.eu-central-1.amazonaws.com/pytorch-geometric.com/whl/torch-1.4.0.html
pip install torch-sparse==latest+${CUDA} -f http://pytorch-sparse.s3-website.eu-central-1.amazonaws.com/whl/torch-1.4.0.html --trusted-host pytorch-sparse.s3-website.eu-central-1.amazonaws.com
``` ```
where `${CUDA}` should be replaced by either `cpu`, `cu92`, `cu100` or `cu101` depending on your PyTorch installation. where `${CUDA}` should be replaced by either `cpu`, `cu92`, `cu100` or `cu101` depending on your PyTorch installation.
......
import boto3
s3_resource = boto3.resource('s3')
bucket = s3_resource.Bucket(name="pytorch-sparse")
objects = bucket.objects.all()
wheels = sorted([obj.key for obj in objects if obj.key[-3:] == 'whl'])
wheels_dict = {}
for torch_version in list(set([wheel.split('/')[1] for wheel in wheels])):
wheels_dict[torch_version] = []
for wheel in wheels:
torch_version = wheel.split('/')[1]
wheels_dict[torch_version].append(wheel)
html = '<!DOCTYPE html>\n<html>\n<body>\n{}\n</body>\n</html>'
href = '<a href="{}">{}</a><br/>'
url = 'http://pytorch-sparse.s3-website.eu-central-1.amazonaws.com/{}.html'
index_html = html.format('\n'.join([
href.format(url.format('whl/' + key), key) for key in wheels_dict.keys()
]))
with open('index.html', 'w') as f:
f.write(index_html)
bucket.Object('whl/index.html').upload_file(
Filename='index.html', ExtraArgs={
'ContentType': 'text/html',
'ACL': 'public-read'
})
url = 'https://pytorch-sparse.s3.eu-central-1.amazonaws.com/{}'
for key, item in wheels_dict.items():
version_html = html.format('\n'.join([
href.format(url.format(i.replace('+', '%2B')),
'/'.join(i.split('/')[2:])) for i in item
]))
with open('{}.html'.format(key), 'w') as f:
f.write(version_html)
bucket.Object('whl/{}.html'.format(key)).upload_file(
Filename='{}.html'.format(key), ExtraArgs={
'ContentType': 'text/html',
'ACL': 'public-read'
})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment