not support Pytorch 1.8.2
Author: liuhoward
Pull request: no

## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->

- `transformers` version: 4.9 and 4.10
- Platform: Dockerfile with ubuntu 18.04 base
- Python version: 3.8
- PyTorch version (GPU?): 1.8.2+cpu and 1.8.2+cu102

I install transformers using Pip in my Dockerfile, when I compile my Dockerfile, it shows error that transformers does not support pytorch 1.8.2+cpu and 1.8.2+cu102:

Downloading transformers-4.10.0-py3-none-any.whl (2.8 MB) 
ERROR: Could not find a version that satisfies the requirement torch==1.8.2+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 1.4.0, 1.4.0+cpu, 1.4.0+cu100, 1.4.0+cu92, 1.5.0, 1.5.0+cpu, 1.5.0+cu101, 1.5.0+cu92, 1.5.1, 1.5.1+cpu, 1.5.1+cu101, 1.5.1+cu92, 1.6.0, 1.6.0+cpu, 1.6.0+cu101, 1.6.0+cu92, 1.7.0, 1.7.0+cpu, 1.7.0+cu101, 1.7.0+cu110, 1.7.0+cu92, 1.7.1, 1.7.1+cpu, 1.7.1+cu101, 1.7.1+cu110, 1.7.1+cu92, 1.7.1+rocm3.7, 1.7.1+rocm3.8, 1.8.0, 1.8.0+cpu, 1.8.0+cu101, 1.8.0+cu111, 1.8.0+rocm3.10, 1.8.0+rocm4.0.1, 1.8.1, 1.8.1+cpu, 1.8.1+cu101, 1.8.1+cu102, 1.8.1+cu111, 1.8.1+rocm3.10, 1.8.1+rocm4.0.1, 1.9.0, 1.9.0+cpu, 1.9.0+cu102, 1.9.0+cu111, 1.9.0+rocm4.0.1, 1.9.0+rocm4.1, 1.9.0+rocm4.2)




Comments:
Hello,

There is actually no torch v1.8.2 on either pypi or [torch hosted repository](https://download.pytorch.org/whl/torch_stable.html). You should probably install v1.8.1 or v1.9.0+

> Hello,
> 
> There is actually no torch v1.8.2 on either pypi or [torch hosted repository](https://download.pytorch.org/whl/torch_stable.html). You should probably install v1.8.1 or v1.9.0+

Hi，you can acess the https://pytorch.org/ and find the  LTS version is PyTorch 1.8.2

Thanks for the info @Doragd. To OP, if you want to use PyTorch v1.8.2, you'll have to follow the install instruction on PyTorch website and then install `transformers` because PyTorch v1.8.2 doesn't exist on the official pypi repository.

I've installed PyTorch v1.8.2, but failed at installing transformers because v1.8.2 is not in supported list in transformers.

I'm pretty sure `transformers` supports PyTorch v1.8.2. The error message you posted does not mean **not supported**, it just means pip cannot find the specific version of PyTorch in the given pip repository.

I've tested the following code on Colab, `transformers` worked as expected.
```
!pip install torch==1.8.2+cpu torchvision==0.9.2+cpu torchaudio==0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
!pip install transformers==4.10
!python --version

import torch
import transformers
from transformers import BertTokenizer

print('PyTorch version:', torch.__version__, ' transformers version:', transformers.__version__)

tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
print(tokenizer("Hello World!"))
```

Outputs:
```
Python 3.7.11
PyTorch version: 1.8.2+cpu  transformers version: 4.10.0
{'input_ids': [101, 7592, 2088, 999, 102], 'token_type_ids': [0, 0, 0, 0, 0], 'attention_mask': [1, 1, 1, 1, 1]}
```

Could you post your Dockerfile here?  so we can better understand what the problem is.

@liuhoward I have installed transformers successfully under the PyTorch v1.8.2. All is well.
You can follow my steps
```shell
$ conda create -n test python=3.8
$ conda activate test
$ pip install torch==1.8.2+cu111  -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
$ pip install transformers
```
The command output logs of `pip list`:
```text
Package            Version
------------------ -------------------
backcall           0.2.0
certifi            2021.5.30
charset-normalizer 2.0.4
click              8.0.1
decorator          4.4.2
filelock           3.0.12
huggingface-hub    0.0.16
idna               3.2
ipykernel          5.5.0
ipython            7.21.0
ipython-genutils   0.2.0
jedi               0.18.0
joblib             1.0.1
jupyter-client     6.1.12
jupyter-core       4.7.1
numpy              1.21.2
packaging          21.0
parso              0.8.1
pexpect            4.8.0
pickleshare        0.7.5
pip                21.0.1
prompt-toolkit     3.0.18
ptyprocess         0.7.0
Pygments           2.8.1
pyparsing          2.4.7
python-dateutil    2.8.1
PyYAML             5.4.1
pyzmq              22.0.3
regex              2021.8.28
requests           2.26.0
sacremoses         0.0.45
setuptools         52.0.0.post20210125
six                1.15.0
tokenizers         0.10.3
torch              1.8.2+cu111      # torch
tornado            6.1
tqdm               4.62.2
traitlets          5.0.5
transformers       4.10.0         # transformers
typing-extensions  3.10.0.2
urllib3            1.26.6
wcwidth            0.2.5
wheel              0.37.0
```

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.