Skip to content

Instantly share code, notes, and snippets.

@kmhofmann
kmhofmann / installing_nvidia_driver_cuda_cudnn_linux.md
Last active January 10, 2025 22:30
Installing the NVIDIA driver, CUDA and cuDNN on Linux

Installing the NVIDIA driver, CUDA and cuDNN on Linux (Ubuntu 20.04)

This is a companion piece to my instructions on building TensorFlow from source. In particular, the aim is to install the following pieces of software

on an Ubuntu Linux system, in particular Ubuntu 20.04.

@sumanthratna
sumanthratna / install-python.bash
Last active April 7, 2025 22:51
How to install Python 3 on Linux without sudo access.
# adapted from https://web.archive.org/web/20200514221628/https://randomwalk.in/python/2019/10/27/Install-Python-copy.html
wget https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tgz
tar zxfv Python-3.6.10.tgz
rm Python-3.6.10.tgz
find ./Python-3.6.10/Python -type d | xargs chmod 0755
cd Python-3.6.10
./configure --prefix=$PWD/Python-3.6.10/Python
make
make install
export PATH=$CWD:$PATH # adds python3.6 to PATH
@stefan-it
stefan-it / tpu_vm_cheatsheet.md
Last active December 5, 2024 23:33
TPU VM Cheatsheet

TPU VM Cheetsheat

This TPU VM cheatsheet uses and was tested with the following library versions:

Library Version
JAX 0.3.25
FLAX 0.6.4
Datasets 2.10.1
Transformers 4.27.1
# This is a new feature, so make sure to update to the latest version of transformers!
# You will also need to pip install tensorflow_text
import tensorflow as tf
from transformers import TFAutoModel, TFBertTokenizer
class EndToEndModel(tf.keras.Model):
def __init__(self, checkpoint):
super().__init__()