import torch
print(torch.__version__)
print(torch.cuda.is_available())
第一步先检查cuda是否能用
!unzip /content/GraphDTA-master.zip
第二步:解压我的文件
!wget -c https://repo.anaconda.com/miniconda/Miniconda3-py37_4.9.2-Linux-x86_64.sh
!chmod +x Miniconda3-py37_4.9.2-Linux-x86_64.sh
!time bash ./Miniconda3-py37_4.9.2-Linux-x86_64.sh -b -f -p /usr/local
!time conda install -q -y -c conda-forge rdkit
import sys
sys.path.append('/usr/local/lib/python3.7/site-packages/')
第三步:安装Miniconda,和rdkit
!conda install scipy
!conda install nexworkx
第四步:安装一些必要的包
!pip install torch-geometric \
torch-sparse==latest+cu101 \
torch-scatter==latest+cu101 \
torch-cluster==latest+cu101 \
-f https://pytorch-geometric.com/whl/torch-1.4.0.html
第五步:安装torch-geometric一些包
!pip install torch===1.4.0 torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html
第六步:重新安装torch
第七步:把云盘的文件上传到colab
from google.colab import drive
drive.mount("/content/drive",force_remount=True)
第八步:使用tensorboard查看可视化
!pip install tensorboardX
%load_ext tensorboard
%tensorboard --logdir=/content/drive/MyDrive/HpyerAttentionDTI-main/