mirror of
https://github.com/open-mmlab/mim.git
synced 2025-06-03 14:59:11 +08:00
[Enhancement] Install mmcv-full by fuzzy matching (#20)
* [Enhancement] Install mmcv-full by fuzzy matching * modify according to comment
This commit is contained in:
parent
855439eb2b
commit
f81e1cc498
@ -236,6 +236,14 @@ def infer_find_url(package: str) -> str:
|
||||
find_url = ''
|
||||
if package in WHEEL_URL:
|
||||
torch_v, cuda_v = get_torch_cuda_version()
|
||||
|
||||
# In order to avoid builiding mmcv-full from source, we ignore the
|
||||
# difference among micro version because there are usually no big
|
||||
# changes among micro version. For example, the mmcv-full built in
|
||||
# pytorch 1.8.0 also works on 1.8.1 or other versions.
|
||||
major, minor, *_ = torch_v.split('.')
|
||||
torch_v = '.'.join([major, minor, '0'])
|
||||
|
||||
if cuda_v.isdigit():
|
||||
cuda_v = f'cu{cuda_v}'
|
||||
find_url = WHEEL_URL[package].format(
|
||||
|
Loading…
x
Reference in New Issue
Block a user