Skip to content

Instantly share code, notes, and snippets.

@jhcao23
Last active July 29, 2023 20:44
Show Gist options
  • Save jhcao23/1a616cb62a08bdc3a6aa71e785731a83 to your computer and use it in GitHub Desktop.
Save jhcao23/1a616cb62a08bdc3a6aa71e785731a83 to your computer and use it in GitHub Desktop.
lambda gpu

install things

pre-requisite

  1. create ssh key
  2. save it to laptop
  3. goto your Lambda Labs portal

launch instance

  1. ubuntu update: sudo apt update && sudo apt upgrade && sudo apt-get dist-upgrade
  2. install nvidia driver: sudo apt-get install libnvidia-compute-525 libnvidia-extra-525 nvidia-compute-utils-525 nvidia-utils-525
  3. install Lambda Stack: wget -nv -O- https://lambdalabs.com/install-lambda-stack.sh | sh - && sudo reboot
  4. install docker: sudo apt-get install docker.io nvidia-container-toolkit containerd
  5. verify its ubuntu server: dpkg --get-selections | grep ubuntu-desktop should return nothing

without lambda stack

  1. upgrade pip: python3 -m pip install --upgrade pip
  2. prepare for TCMaloc: sudo apt-get install libgoogle-perftools4 libtcmalloc-minimal4 -y
  3. install xformers: pip install -U xformers
  4. clone sd-webui: git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui && cd stable-diffusion-webui
  5. run: ./webui.sh --xformers --api --share

Issues

  1. Cannot locate TCMalloc (improves CPU memory usage)
  sudo apt-get install libgoogle-perftools4 libtcmalloc-minimal4 -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment