1.conda 安装python3.7环境;
2.因为torch1.8.2环境已经被弃用,所以通过nvidia-smi
命令确认cuda版本是11.6后进入环境,
输入pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 torchtext==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu116
安装torch四件套;
3.因为安装demjson时出问题,原因是setup tools的版本太高,输入pip install --upgrade setuptools==57.5.0
降级;
4.安装apex时候没有0.1.0版本,需要去英伟达github的仓库上下载并按照,太麻烦了,所以暂且用别的版本,输入pip install apex
;
5.修改requirements.txt文件换成如下:
absl-py==0.15.0
# apex==0.1
astunparse==1.6.3
attrs==21.2.0
boto3==1.20.24
botocore==1.23.24
cachetools==4.2.4
certifi==2021.10.8
charset-normalizer==2.0.9
click==8.0.3
cycler==0.11.0
Cython==0.29.26
demjson==2.2.4
easydict==1.9
editdistance==0.6.0
fasttext==0.9.1
flatbuffers==1.12
fonttools==4.28.4
gast==0.3.3
gitdb==4.0.9
GitPython==3.1.24
google-auth==2.3.3
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
grpcio==1.32.0
h5py==2.10.0
idna==3.3
imageio==2.13.5
importlib-metadata==4.9.0
iniconfig==1.1.1
jmespath==0.10.0
joblib==1.1.0
Keras-Preprocessing==1.1.2
kiwisolver==1.3.2
Markdown==3.3.6
matplotlib==3.5.1
networkx==2.6.3
nltk==3.6.5
numpy==1.19.5
oauthlib==3.1.1
opencv-python==4.5.5.62
opt-einsum==3.3.0
packaging==21.3
Pillow==8.4.0
pluggy==1.0.0
protobuf==3.19.1
pytest==6.2.5
python-dateutil==2.8.2
pytorch-transformers==1.2.0
PyWavelets==1.2.0
PyYAML==6.0
regex==2021.11.10
requests==2.26.0
requests-oauthlib==1.3.0
rsa==4.8
s3transfer==0.5.0
sacremoses==0.0.46
scikit-image==0.19.1
scipy==1.7.3
sentencepiece==0.1.96
six==1.15.0
smmap==5.0.0
tdqm==0.0.1
tensorboard==2.7.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorboardX==2.4.1
tensorflow-estimator==2.4.0
tensorflow-gpu==2.4.0
termcolor==1.1.0
tifffile==2021.11.2
toml==0.10.2
# torchtext==0.9.2(已弃用)
# torch==1.8.2+cu111
# torchaudio==0.8.2
# torchvision==0.9.2+cu111
tqdm==4.62.3
typing-extensions==3.7.4.3
urllib3==1.26.7
Werkzeug==2.0.2
wrapt==1.12.1
zipp==3.6.0
Quantlib地址
torch四件套版本对应
torch版本安装官网