# DeepBSA 流程
记录一下我装 DeepBSA 的流程。
首先想尝试使用 singularity 镜像,就还是使用了 miniconda3_base.sif 的镜像。
使用 yaml 去装:
1 | name: deepbsa |
装上了,封装镜像,可以跑,就上传 HPC,但是!tensorflow 不能识别 GPU!!!
尝试使用 singularity --nv 选项,在 HPC 的 GPU 节点试一试。
1 | singularity shell --nv deepbsa.sif |
还是不行!后来差点就直接用 CPU 跑了,这个速度实在感人。
过了一晚上,炸裂的心态得到了回复。想着直接用 conda 装好了,正常配置环节,cudatoolkit,cudnn,tensorflow-gpu 一通安装。
结果 tensorflow-gpu 不能识别 cuda。这时候就很懵逼了,毕竟刚用 conda 装的。直到我看到了这样一个帖子,GPU enabled TensorFlow builds on conda-forge | conda-forge | community-driven packaging for conda
When installing the
tensorflow
package, the package resolution will now default to the GPU-enabled builds of tensorflow if the local machine has a GPU (these builds can be identified by “cuda” at the beginning of the version number). Note that GPU-enabled packages can also work on CPU-only machines, but one would need to override the enviornment variableCONDA_OVERRIDE_CUDA
like below. This could be handy if you are in a situation where your current node (e.g. login node) on an HPC does not have GPUs, but the compute nodes with GPUs do not have internet access.
这… 就很神奇了,按照方法改了一下环境变量。
1 | CONDA_OVERRIDE_CUDA="11.2" mamba install -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge \ |
然后就成了,后面再手动安装每个包。
然后就可以用了。
现在怀疑:
- singularity 没有按照这个流程装,所以镜像里面的 tf2 不能识别 GPU
下次有空再试一试。