Build / install Gradio from Source code

4 ways to install

Paul Xiong
May 27, 2022
$ pip install gradio
  • from local network:
$ pip install 192.168.1.11/gradio
  • from local machine:
$ pip install ../gradio
  • from local and auto sync modification:
$ pip install -e .

Uninstall for pip installed

$ pip uninstall gradio
  • Uninstall for local installed:
$ rm  /usr/local/lib/python3.8/dist-packages/easy-install.pth
$ rm /usr/local/bin/gradio
$ rm -r /usr/local/lib/python3.8/dist-packages/gradio
$ rm /usr/local/lib/python3.8/dist-packages/gradio.egg-link

Build from source

  • install pnpm, (Note: pnpm latest version won’t work with build gui, use 6.x instead.)
$ wget -qO- https://get.pnpm.io/install.sh | PNPM_VERSION=6.32.11 sh

Add path to .bashrc

export PATH=$PATH:/root/.local/share/pnpm/

then

$ source ~/.bashrc
  • install backend:
$ bash scripts/install_gradio.sh
  • build front end:
$ bash scripts/build_frontend.sh

reference guide:

https://github.com/gradio-app/gradio/blob/main/CONTRIBUTING.md

--

--

Paul Xiong
Paul Xiong

Written by Paul Xiong

Predicting the next word (token) is what powers ChatGPT, while predicting the next photo (embedding) forms the foundation of ImageGPT.

No responses yet