This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathrun_cupy_install_test.py
executable file
·66 lines (56 loc) · 1.9 KB
/
run_cupy_install_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env python
import argparse
import os
import argconfig
import docker
import shuffle
import version
params = {
'base': None,
'cuda_libs': docker.get_cuda_libs_choices('cupy', with_dummy=True),
'numpy': ['1.17', '1.18', '1.19'],
'cython': ['0.29.22'],
'pip': [None, '7', '8', '9', '10'],
'wheel': [False, True],
}
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='Test script for installation')
parser.add_argument('--id', type=int, required=True)
parser.add_argument('--no-cache', action='store_true')
parser.add_argument('--timeout', default='2h')
parser.add_argument('-i', '--interactive', action='store_true')
argconfig.setup_argument_parser(parser)
args = parser.parse_args()
if version.is_master_branch('cupy'):
params['base'] = docker.base_choices_master_cupy
else:
params['base'] = docker.base_choices_stable_cupy
# make sdist
# cuda, cudnn and numpy is required to make a sdist file.
build_conf = {
'base': 'ubuntu18_py36',
'cuda': 'cuda100',
'cudnn': 'cudnn76-cuda100',
'nccl': 'none',
'cutensor': 'none',
'cusparselt': 'none',
'requires': ['cython==0.29.22', 'numpy==1.17.5'],
}
volume = []
env = {}
argconfig.parse_args(args, env, build_conf, volume)
docker.run_with(build_conf, './build_sdist_cupy.sh', volume=volume,
env=env)
conf = shuffle.make_shuffle_conf(params, args.id)
volume = []
env = {}
argconfig.parse_args(args, env, conf, volume)
if args.interactive:
docker.run_interactive(
conf, no_cache=args.no_cache, volume=volume, env=env,
use_root=args.root)
else:
docker.run_with(
conf, './test_cupy_install.sh', no_cache=args.no_cache,
volume=volume, env=env, timeout=args.timeout, use_root=args.root)