Skip to content

Instantly share code, notes, and snippets.

@niklasschmitz
niklasschmitz / jaxpr_graph.py
Last active June 24, 2024 17:53 — forked from mattjj/grad_graph.py
visualizing jaxprs
import jax
from jax import core
from graphviz import Digraph
import itertools
styles = {
'const': dict(style='filled', color='goldenrod1'),
'invar': dict(color='mediumspringgreen', style='filled'),
'outvar': dict(style='filled,dashed', fillcolor='indianred1', color='black'),
@niklasschmitz
niklasschmitz / install-CUDA-docker-nvidia-docker.sh
Last active December 2, 2018 12:31 — forked from dte/install-CUDA-docker-nvidia-docker.sh
Install CUDA, Docker, and Nvidia Docker on a new Paperspace GPU machine with Ubuntu 18.04
#!/bin/bash
# 1. Install CUDA
echo "Installing CUDA..."
# Only install if CUDA is not already installed.
if ! sudo dpkg-query -W cuda; then
# The 18.04 installer
sudo curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo dpkg -i ./cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda -y