Skip to content

Commit a24729a

Browse files
ppwwyyxxfacebook-github-bot
authored andcommitted
add torch1.10 to CI
Reviewed By: zhanghang1989 Differential Revision: D31853130 fbshipit-source-id: 749767cb24e88018ec3a613295d56f5c9d4b1899
1 parent e98998d commit a24729a

File tree

4 files changed

+36
-28
lines changed

4 files changed

+36
-28
lines changed

.circleci/config.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ cpu: &cpu
1010

1111
gpu: &gpu
1212
machine:
13-
#image: ubuntu-1604-cuda-10.1:201909-23
1413
# NOTE: use a cuda vesion that's supported by all our pytorch versions
15-
image: ubuntu-1604-cuda-10.2:202012-01
16-
resource_class: gpu.small
14+
image: ubuntu-1604-cuda-11.1:202012-01
15+
resource_class: gpu.nvidia.small
1716

1817
windows-cpu: &windows_cpu
1918
machine:
@@ -226,22 +225,26 @@ workflows:
226225
regular_test:
227226
jobs:
228227
- linux_cpu_tests:
229-
name: linux_cpu_tests_pytorch1.9
230-
pytorch_version: '1.9.0+cpu'
231-
torchvision_version: '0.10.0+cpu'
228+
name: linux_cpu_tests_pytorch1.10
229+
pytorch_version: '1.10.0+cpu'
230+
torchvision_version: '0.11.1+cpu'
232231
- linux_gpu_tests:
233232
name: linux_gpu_tests_pytorch1.8
234-
pytorch_version: '1.8.1+cu102'
235-
torchvision_version: '0.9.1+cu102'
233+
pytorch_version: '1.8.1+cu111'
234+
torchvision_version: '0.9.1+cu111'
236235
- linux_gpu_tests:
237236
name: linux_gpu_tests_pytorch1.9
238-
pytorch_version: '1.9+cu102'
239-
torchvision_version: '0.10+cu102'
237+
pytorch_version: '1.9+cu111'
238+
torchvision_version: '0.10+cu111'
240239
- linux_gpu_tests:
241-
name: linux_gpu_tests_pytorch1.9_python39
242-
pytorch_version: '1.9+cu102'
243-
torchvision_version: '0.10+cu102'
240+
name: linux_gpu_tests_pytorch1.10
241+
pytorch_version: '1.10+cu111'
242+
torchvision_version: '0.11.1+cu111'
243+
- linux_gpu_tests:
244+
name: linux_gpu_tests_pytorch1.10_python39
245+
pytorch_version: '1.10+cu111'
246+
torchvision_version: '0.11.1+cu111'
244247
python_version: '3.9.6'
245248
- windows_cpu_build:
246-
pytorch_version: '1.9+cpu'
247-
torchvision_version: '0.10+cpu'
249+
pytorch_version: '1.10+cpu'
250+
torchvision_version: '0.11.1+cpu'

.github/workflows/workflow.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ jobs:
1515
with:
1616
python-version: 3.6
1717
- name: Install dependencies
18+
# flake8-bugbear flake8-comprehensions are useful but not available internally
1819
run: |
1920
python -m pip install --upgrade pip
20-
python -m pip install flake8==3.8.1 flake8-bugbear flake8-comprehensions isort==4.3.21
21+
python -m pip install flake8==3.8.1 isort==4.3.21
2122
python -m pip install black==21.4b2
2223
flake8 --version
2324
- name: Lint
@@ -36,12 +37,14 @@ jobs:
3637
strategy:
3738
fail-fast: false
3839
matrix:
39-
torch: [1.8, 1.9]
40+
torch: ["1.8", "1.9", "1.10"]
4041
include:
41-
- torch: 1.8
42+
- torch: "1.8"
4243
torchvision: 0.9
43-
- torch: 1.9
44+
- torch: "1.9"
4445
torchvision: "0.10"
46+
- torch: "1.10"
47+
torchvision: "0.11.1"
4548
steps:
4649
- name: Checkout
4750
uses: actions/checkout@v2

docker/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM nvidia/cuda:11.1.1-cudnn8-devel
1+
FROM nvidia/cuda:11.1.1-cudnn8-devel-ubuntu18.04
2+
# use an older system (18.04) to avoid opencv incompatibility (issue#3524)
23

34
ENV DEBIAN_FRONTEND noninteractive
45
RUN apt-get update && apt-get install -y \
@@ -20,7 +21,7 @@ RUN wget https://bootstrap.pypa.io/get-pip.py && \
2021
# install dependencies
2122
# See https://pytorch.org/ for other options if you use a different version of CUDA
2223
RUN pip install --user tensorboard cmake # cmake from apt-get is too old
23-
RUN pip install --user torch==1.9 torchvision==0.10 -f https://download.pytorch.org/whl/cu111/torch_stable.html
24+
RUN pip install --user torch==1.10 torchvision==0.11.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html
2425

2526
RUN pip install --user 'git+https://github.com/facebookresearch/fvcore'
2627
# install detectron2

docker/deploy.Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,23 @@ USER appuser
99
ENV HOME=/home/appuser
1010
WORKDIR $HOME
1111

12-
ENV CMAKE_PREFIX_PATH=$HOME/.local/lib/python3.8/site-packages/torch/
12+
# Let torchvision find libtorch
13+
ENV CMAKE_PREFIX_PATH=$HOME/.local/lib/python3.6/site-packages/torch/
1314

1415
RUN sudo apt-get update && sudo apt-get install libgflags-dev libgoogle-glog-dev libopencv-dev --yes
1516
RUN pip install mkl-include
1617

17-
# Install the correct version of protobuf:
18-
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protobuf-cpp-3.11.4.tar.gz && tar xf protobuf-cpp-3.11.4.tar.gz
18+
# Install the correct version of protobuf (find it at torch/caffe2/proto/caffe2.pb.h after installing pytorch):
19+
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protobuf-cpp-3.13.0.tar.gz && tar xf protobuf-cpp-3.13.0.tar.gz
1920
RUN export CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=$(python3 -c 'import torch; print(int(torch.compiled_with_cxx11_abi()))'); \
20-
cd protobuf-3.11.4 && \
21-
./configure --prefix=$HOME/.local && make && make install
21+
cd protobuf-3.13.0 && \
22+
./configure --prefix=$HOME/.local && make -j && make install
2223

2324
# install libtorchvision
24-
RUN git clone --branch v0.10.0 https://github.com/pytorch/vision/
25+
RUN git clone --branch v0.11.1 https://github.com/pytorch/vision/
2526
RUN mkdir vision/build && cd vision/build && \
2627
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DCMAKE_BUILD_TYPE=Release -DWITH_CUDA=on -DTORCH_CUDA_ARCH_LIST=$TORCH_CUDA_ARCH_LIST && \
27-
make && make install
28+
make -j && make install
2829

2930
# make our installation take effect
3031
ENV CPATH=$HOME/.local/include \

0 commit comments

Comments
 (0)