Skip to content

Commit

Permalink
switch to torch 1.10 (#295)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #295

Reviewed By: kiukchung, aivanou

Differential Revision: D31832289

Pulled By: d4l3k

fbshipit-source-id: 9b18dceed75d6d80a20727f4f88597a856566a89
  • Loading branch information
d4l3k authored and facebook-github-bot committed Oct 21, 2021
1 parent 8226743 commit 13bd1e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 32 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/python-unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,11 @@ jobs:
unittest:
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
platform: [ubuntu-18.04]
include:
# TODO: uncomment this when torch.1-10 is released
# - python-version: 3.9
# platform: macos-latest
# TODO: remove this when torch.1-10 is released
- python-version: 3.7
platform: ubuntu-18.04
torch-whl: https://download.pytorch.org/whl/test/cu113/torch-1.10.0%2Bcu113-cp37-cp37m-linux_x86_64.whl
- python-version: 3.8
platform: ubuntu-18.04
torch-whl: https://download.pytorch.org/whl/test/cu113/torch-1.10.0%2Bcu113-cp38-cp38-linux_x86_64.whl
- python-version: 3.9
platform: ubuntu-18.04
torch-whl: https://download.pytorch.org/whl/test/cu113/torch-1.10.0%2Bcu113-cp39-cp39-linux_x86_64.whl
platform: macos-latest
fail-fast: false
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -39,8 +30,6 @@ jobs:
set -eux
pip install coverage codecov
pip install -e .[dev]
pip uninstall -y torch
pip install ${{ matrix.torch-whl }}
- name: Run tests
run: coverage run -m unittest discover --verbose --start-directory . --pattern "*_test.py"
- name: Coverage
Expand Down
5 changes: 3 additions & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ pyre-extensions>=0.0.21
black>=21.5b1
usort==0.6.4
pytorch-lightning>=1.4.9
torch>=1.9.0
torchvision>=0.10.0
torch>=1.10.0
torchvision>=0.11.1
torchtext>=0.11.0
classy-vision>=0.6.0
flake8==3.9.0
ts>=0.5.1
Expand Down
17 changes: 1 addition & 16 deletions torchx/runtime/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,12 @@ FROM pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime

RUN pip install fsspec[s3]

# Note: the pytorch image installs version of the torchvision that is not compatible
# with CUDA. By using it directly there will be a segfault.
RUN pip uninstall -y torchvision
RUN pip install torchvision

WORKDIR /app

# copy requirements early so we don't have to redownload dependencies on code
# changes
COPY dev-requirements.txt /app
RUN pip install -r dev-requirements.txt

# TODO: Remove this and get dependency on torch 1.10 when it is released

RUN pip uninstall -y torch

RUN pip install https://download.pytorch.org/whl/test/cu113/torch-1.10.0%2Bcu113-cp37-cp37m-linux_x86_64.whl

RUN pip uninstall -y torchtext

RUN pip install https://download.pytorch.org/whl/test/torchtext-0.10.0-cp37-cp37m-linux_x86_64.whl
RUN pip install --upgrade -r dev-requirements.txt

COPY . /app

Expand Down

0 comments on commit 13bd1e9

Please sign in to comment.