Skip to content

Commit 39f2679

Browse files
committed
Rewrite torchvision packaging (#1209)
Following a similar line of inquiry to pytorch/audio#217
1 parent d31eafa commit 39f2679

File tree

16 files changed

+664
-36
lines changed

16 files changed

+664
-36
lines changed

.circleci/config.yml

Lines changed: 288 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,288 @@
1+
version: 2.1
2+
3+
# How to test the Linux jobs:
4+
# - Install CircleCI local CLI: https://circleci.com/docs/2.0/local-cli/
5+
# - circleci config process .circleci/config.yml > gen.yml && circleci local execute -c gen.yml --job binary_linux_wheel
6+
# - Replace binary_linux_wheel with the name of the job you want to test
7+
8+
binary_common: &binary_common
9+
parameters:
10+
# Edit these defaults to do a release`
11+
build_version:
12+
description: "version number of release binary; by default, build a nightly"
13+
type: string
14+
default: ""
15+
pytorch_version:
16+
description: "PyTorch version to build against; by default, use a nightly"
17+
type: string
18+
default: ""
19+
# Don't edit these
20+
python_version:
21+
description: "Python version to build against (e.g., 3.7)"
22+
type: string
23+
cuda_version:
24+
description: "CUDA version to build against (e.g., cpu or 10.0)"
25+
type: string
26+
unicode_abi:
27+
description: "Python 2.7 wheel only: whether or not we are cp27mu (default: no)"
28+
type: string
29+
default: ""
30+
environment:
31+
PYTHON_VERSION: << parameters.python_version >>
32+
BUILD_VERSION: << parameters.build_version >>
33+
PYTORCH_VERSION: << parameters.pytorch_version >>
34+
UNICODE_ABI: << parameters.unicode_abi >>
35+
CUDA_VERSION: << parameters.cuda_version >>
36+
37+
jobs:
38+
circleci_consistency:
39+
docker:
40+
- image: circleci/python:3.7
41+
steps:
42+
- checkout
43+
- run:
44+
command: |
45+
pip install --user --progress-bar off jinja2
46+
python .circleci/regenerate.py
47+
git diff --exit-code || (echo ".circleci/config.yml not in sync with config.yml.in! Run .circleci/regenerate.py to update config"; exit 1)
48+
49+
binary_linux_wheel:
50+
<<: *binary_common
51+
docker:
52+
- image: "soumith/manylinux-cuda100"
53+
resource_class: 2xlarge+
54+
steps:
55+
- checkout
56+
- run: packaging/build_wheel.sh
57+
- store_artifacts:
58+
path: dist
59+
60+
binary_linux_conda:
61+
<<: *binary_common
62+
docker:
63+
- image: "soumith/conda-cuda"
64+
resource_class: 2xlarge+
65+
steps:
66+
- checkout
67+
- run: packaging/build_conda.sh
68+
- store_artifacts:
69+
path: /opt/conda/conda-bld/linux-64
70+
71+
binary_macos_wheel:
72+
<<: *binary_common
73+
macos:
74+
xcode: "9.0"
75+
steps:
76+
- checkout
77+
- run:
78+
# Cannot easily deduplicate this as source'ing activate
79+
# will set environment variables which we need to propagate
80+
# to build_wheel.sh
81+
command: |
82+
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
83+
sh conda.sh -b
84+
source $HOME/miniconda3/bin/activate
85+
packaging/build_wheel.sh
86+
- store_artifacts:
87+
path: dist
88+
89+
binary_macos_conda:
90+
<<: *binary_common
91+
macos:
92+
xcode: "9.0"
93+
steps:
94+
- checkout
95+
- run:
96+
command: |
97+
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
98+
sh conda.sh -b
99+
source $HOME/miniconda3/bin/activate
100+
conda install -yq conda-build
101+
packaging/build_conda.sh
102+
- store_artifacts:
103+
path: /Users/distiller/miniconda3/conda-bld/osx-64
104+
105+
workflows:
106+
build:
107+
jobs:
108+
- circleci_consistency
109+
- binary_linux_wheel:
110+
# TODO: cudacpu is ugly
111+
name: binary_linux_wheel_py2.7_cudacpu
112+
python_version: "2.7"
113+
cuda_version: "cpu"
114+
- binary_linux_wheel:
115+
name: binary_linux_wheel_py2.7_cudacpu_unicode
116+
python_version: "2.7"
117+
cuda_version: "cpu"
118+
unicode_abi: "1"
119+
- binary_linux_wheel:
120+
# TODO: cudacpu is ugly
121+
name: binary_linux_wheel_py2.7_cuda10.0
122+
python_version: "2.7"
123+
cuda_version: "10.0"
124+
- binary_linux_wheel:
125+
name: binary_linux_wheel_py2.7_cuda10.0_unicode
126+
python_version: "2.7"
127+
cuda_version: "10.0"
128+
unicode_abi: "1"
129+
- binary_linux_wheel:
130+
# TODO: cudacpu is ugly
131+
name: binary_linux_wheel_py2.7_cuda9.2
132+
python_version: "2.7"
133+
cuda_version: "9.2"
134+
- binary_linux_wheel:
135+
name: binary_linux_wheel_py2.7_cuda9.2_unicode
136+
python_version: "2.7"
137+
cuda_version: "9.2"
138+
unicode_abi: "1"
139+
- binary_linux_wheel:
140+
# TODO: cudacpu is ugly
141+
name: binary_linux_wheel_py3.5_cudacpu
142+
python_version: "3.5"
143+
cuda_version: "cpu"
144+
- binary_linux_wheel:
145+
# TODO: cudacpu is ugly
146+
name: binary_linux_wheel_py3.5_cuda10.0
147+
python_version: "3.5"
148+
cuda_version: "10.0"
149+
- binary_linux_wheel:
150+
# TODO: cudacpu is ugly
151+
name: binary_linux_wheel_py3.5_cuda9.2
152+
python_version: "3.5"
153+
cuda_version: "9.2"
154+
- binary_linux_wheel:
155+
# TODO: cudacpu is ugly
156+
name: binary_linux_wheel_py3.6_cudacpu
157+
python_version: "3.6"
158+
cuda_version: "cpu"
159+
- binary_linux_wheel:
160+
# TODO: cudacpu is ugly
161+
name: binary_linux_wheel_py3.6_cuda10.0
162+
python_version: "3.6"
163+
cuda_version: "10.0"
164+
- binary_linux_wheel:
165+
# TODO: cudacpu is ugly
166+
name: binary_linux_wheel_py3.6_cuda9.2
167+
python_version: "3.6"
168+
cuda_version: "9.2"
169+
- binary_linux_wheel:
170+
# TODO: cudacpu is ugly
171+
name: binary_linux_wheel_py3.7_cudacpu
172+
python_version: "3.7"
173+
cuda_version: "cpu"
174+
- binary_linux_wheel:
175+
# TODO: cudacpu is ugly
176+
name: binary_linux_wheel_py3.7_cuda10.0
177+
python_version: "3.7"
178+
cuda_version: "10.0"
179+
- binary_linux_wheel:
180+
# TODO: cudacpu is ugly
181+
name: binary_linux_wheel_py3.7_cuda9.2
182+
python_version: "3.7"
183+
cuda_version: "9.2"
184+
- binary_macos_wheel:
185+
# TODO: cudacpu is ugly
186+
name: binary_macos_wheel_py2.7_cudacpu
187+
python_version: "2.7"
188+
cuda_version: "cpu"
189+
- binary_macos_wheel:
190+
name: binary_macos_wheel_py2.7_cudacpu_unicode
191+
python_version: "2.7"
192+
cuda_version: "cpu"
193+
unicode_abi: "1"
194+
- binary_macos_wheel:
195+
# TODO: cudacpu is ugly
196+
name: binary_macos_wheel_py3.5_cudacpu
197+
python_version: "3.5"
198+
cuda_version: "cpu"
199+
- binary_macos_wheel:
200+
# TODO: cudacpu is ugly
201+
name: binary_macos_wheel_py3.6_cudacpu
202+
python_version: "3.6"
203+
cuda_version: "cpu"
204+
- binary_macos_wheel:
205+
# TODO: cudacpu is ugly
206+
name: binary_macos_wheel_py3.7_cudacpu
207+
python_version: "3.7"
208+
cuda_version: "cpu"
209+
- binary_linux_conda:
210+
# TODO: cudacpu is ugly
211+
name: binary_linux_conda_py2.7_cudacpu
212+
python_version: "2.7"
213+
cuda_version: "cpu"
214+
- binary_linux_conda:
215+
# TODO: cudacpu is ugly
216+
name: binary_linux_conda_py2.7_cuda10.0
217+
python_version: "2.7"
218+
cuda_version: "10.0"
219+
- binary_linux_conda:
220+
# TODO: cudacpu is ugly
221+
name: binary_linux_conda_py2.7_cuda9.2
222+
python_version: "2.7"
223+
cuda_version: "9.2"
224+
- binary_linux_conda:
225+
# TODO: cudacpu is ugly
226+
name: binary_linux_conda_py3.5_cudacpu
227+
python_version: "3.5"
228+
cuda_version: "cpu"
229+
- binary_linux_conda:
230+
# TODO: cudacpu is ugly
231+
name: binary_linux_conda_py3.5_cuda10.0
232+
python_version: "3.5"
233+
cuda_version: "10.0"
234+
- binary_linux_conda:
235+
# TODO: cudacpu is ugly
236+
name: binary_linux_conda_py3.5_cuda9.2
237+
python_version: "3.5"
238+
cuda_version: "9.2"
239+
- binary_linux_conda:
240+
# TODO: cudacpu is ugly
241+
name: binary_linux_conda_py3.6_cudacpu
242+
python_version: "3.6"
243+
cuda_version: "cpu"
244+
- binary_linux_conda:
245+
# TODO: cudacpu is ugly
246+
name: binary_linux_conda_py3.6_cuda10.0
247+
python_version: "3.6"
248+
cuda_version: "10.0"
249+
- binary_linux_conda:
250+
# TODO: cudacpu is ugly
251+
name: binary_linux_conda_py3.6_cuda9.2
252+
python_version: "3.6"
253+
cuda_version: "9.2"
254+
- binary_linux_conda:
255+
# TODO: cudacpu is ugly
256+
name: binary_linux_conda_py3.7_cudacpu
257+
python_version: "3.7"
258+
cuda_version: "cpu"
259+
- binary_linux_conda:
260+
# TODO: cudacpu is ugly
261+
name: binary_linux_conda_py3.7_cuda10.0
262+
python_version: "3.7"
263+
cuda_version: "10.0"
264+
- binary_linux_conda:
265+
# TODO: cudacpu is ugly
266+
name: binary_linux_conda_py3.7_cuda9.2
267+
python_version: "3.7"
268+
cuda_version: "9.2"
269+
- binary_macos_conda:
270+
# TODO: cudacpu is ugly
271+
name: binary_macos_conda_py2.7_cudacpu
272+
python_version: "2.7"
273+
cuda_version: "cpu"
274+
- binary_macos_conda:
275+
# TODO: cudacpu is ugly
276+
name: binary_macos_conda_py3.5_cudacpu
277+
python_version: "3.5"
278+
cuda_version: "cpu"
279+
- binary_macos_conda:
280+
# TODO: cudacpu is ugly
281+
name: binary_macos_conda_py3.6_cudacpu
282+
python_version: "3.6"
283+
cuda_version: "cpu"
284+
- binary_macos_conda:
285+
# TODO: cudacpu is ugly
286+
name: binary_macos_conda_py3.7_cudacpu
287+
python_version: "3.7"
288+
cuda_version: "cpu"

0 commit comments

Comments
 (0)