forked from lightly-ai/lightly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
110 lines (93 loc) · 3.44 KB
/
tox.ini
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Make sure you have python 3.7 installed for the tox tests
# If not, you can install for example python 3.6 using the following commands
# 1. Install build dependencies
# `sudo apt-get install make build-essential libssl-dev zlib1g-dev libbz2-dev libsqlite3-dev`
# 2. Download python version
# `wget https://www.python.org/ftp/python/3.7.13/Python-3.7.13.tgz`
# 3. Unpack archive
# `tar xzf Python-3.7.13.tgz`
# 4. Go to new folder
# `cd Python-3.7.13`
# 5. Configure installation
# `sudo ./configure --enable-optimizations`
# 6. Install Python
# `sudo make altinstall`
# 7. Install pip
# `python3.6 -m ensurepip --default-pip`
# you should get the following message:
# Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (40.6.2)
# Requirement already satisfied: pip in /usr/local/lib/python3.7/site-packages (18.1)
[tox]
envlist = cuda, cpu, cpu-minimal, video
# we install the package manually later
skipsdist=True
[testenv:cuda]
# test the full package on the gpu
basepython = python3.7
# suppress warnings
whitelist_externals = make
pip
echo
passenv = *
setenv = LIGHTLY_SERVER_LOCATION = https://api.dev.lightly.ai
commands =
pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
pip install .[dev]
echo "Running cuda test"
make test
[testenv:cpu]
# test the full package on the cpu
basepython = python3.7
# suppress warnings
whitelist_externals = make
pip
echo
passenv = *
setenv = LIGHTLY_SERVER_LOCATION = https://api.dev.lightly.ai
CUDA_VISIBLE_DEVICES = -1
commands =
pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install .[dev]
echo "Running cpu test"
make test
[testenv:cpu-minimal]
# test the full package on the cpu with minimal configuration
basepython = python3.7
# suppress warnings
whitelist_externals = make
pip
echo
passenv = *
setenv = LIGHTLY_SERVER_LOCATION = https://api.dev.lightly.ai
CUDA_VISIBLE_DEVICES = -1
commands =
pip install pillow==7.0.0
pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install pytorch-lightning==1.5
pip install hydra-core==1.0.0
pip install numpy==1.18.1
pip install urllib3==1.15.1
pip install requests==2.23.0
pip install tqdm==4.44
pip install certifi==14.05.14
pip install six==1.10
pip install python_dateutil==2.5.3
pip install setuptools==21.0.0
pip install .[dev]
echo "Running cpu-minimal test"
make test
[testenv:video]
# test the full package on the cpu with minimal configuration
basepython = python3.7
# suppress warnings
whitelist_externals = make
pip
echo
passenv = *
setenv = LIGHTLY_SERVER_LOCATION = https://api.dev.lightly.ai
CUDA_VISIBLE_DEVICES = -1
commands =
pip install torch==1.7.0+cu101 torchvision==0.8.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html
pip install .[all]
echo "Running video test"
make test