Additional notes and errata¶
Working with compiled Tensorflow binaries on GCP¶
Compute engine instances built with their deeplearning
family of images includes pre-compiled tensorflow
binaries. Hooray! How the hell do you use 'em?
These binaries are compiled for install with conda
or mamba
, and located in the following path.
/opt/deeplearning/binaries/tensorflow/{somename}-tf-{version}-{cpu|gpu}-{hash}.tar.bz2
You can install these binaries directly, but you'll first need to resolve some dependencies. My initial install list was:
mamba install -c conda-forge jupyter jupyterlab nodejs
pip install --upgrade pyarrow
Installing pyarrow
from pip was required for me because going through mamba
would have required downgrading tensorflow from 2.4.3 to 2.3.0. Dumb. Once you've got your dependencies square, identify the binary you want to install and pass it directly to mamba
.
mamba install /opt/deeplearning/binaries/tensorflow/dlenv-tf-2-4-gpu-1.0.20210512-py37hfeb105c_0.tar.bz2
Fixing NVIDIA driver issues on GCP deep learning images¶
Though GCP has a series of deeplearning
images, they are mostly built with broken NVIDIA drivers. The issue is that the driver configuration breaks once the instance is shut down. Why the fuck would they know this and not patch the image? I don't know, but this StackOverflow thread has instructions for fixing it (also posted on the google-dl-platform groups page).
Applying scalers to feature and response data¶
Here's a nifty article on different scalers to apply to model training data. Several of these methods are implemented in the myco.scalers
module.