Skip to main content

title: lisa + gradio + fastapi + CUDA emoji: ⚡ colorFrom: red colorTo: purple sdk: gradio sdk_version: 5.9.1 app_file: app.py pinned: true

LISA (Reasoning Segmentation via Large Language Model) on cuda, now with huggingface ZeroGPU support!

Exec jupyter on the remote server with port forwarding on localhost

  1. checkout repo, install venv with jupyter
  2. port forwarding in localhost wiht private key: ssh -i /path/to/private_key name@endpoint.com -L 8889:localhost:8889 -N -f
  3. start the jupyter-lab server
  4. connect to page in localhost

Commands to work on remote virtual machines (e.g. SaturnCloud) after clone and git lfs install

cd ~/workspace/lisa-on-cuda/
rm -rf lisa_venv 
python3 -m venv lisa_venv
ln -s lisa_venv/ venv
source  venv/bin/activate
pip --version
which python
python -m pip install pip wheel --upgrade
python -m pip install pytest pytest-cov jupyterlab
python -m pip install -r requirements.txt
nohup jupyter-lab &
tail -F nohup.out

Jupyterlab Howto

To run the test.ipynb notebook you should already:

Hardware requirements for local usage

  • an nvidia gpu with 10 or 12GB of memory (a T4 should suffice)
  • at least 16GB of system ram

Hardware requirements on huggingface ZeroGPU

Right now (July 2024) huggingface let use ZeroGPU Nvidia A100 GPUs.

Gradio Open in OpenXLab

See LISA for details on the original project. Note that the authors don't keep the project updated anymore.

Dependencies and HuggingFace demos with Gradio SDK

HuggingFace demos based on Gradio SDK (you need that to use ZeroGPU hardware) needs updated requirements.txt. You can keep your requirements.txt in sync with the dependencies installed in the project using this python command (from samgis-core):

python -m samgis_core.utilities.update_requirements_txt --req_no_version_path requirements_no_versions.txt --req_output_path requirements.txt

About the parameters:

  • input argument --req_no_version_path is a file with the dependencies package list without version declared
  • output argument --req_output_path is the output requirements.txt

This command simply freeze the installed packages and filter it using the dependencies package list from the input argument. If you need to modify the requirements_no_versions.txt file, avoid inserting

  • python (this is required only by poetry)
  • gradio, gradio-client (installed directly by HuggingFace, selecting the version in header section of the README.md file)
  • spaces (installed directly by HuggingFace, version selected connected by the gradio version)

In case of doubt check the HuggingFace container log for the correct spaces package version.

Release files for lisa-on-cuda 1.4.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lisa-on-cuda 1.4.14
File Size Uploaded
lisa_on_cuda-1.4.14.tar.gz 95.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lisa-on-cuda 1.4.14
File Interpreter ABI Platform
lisa_on_cuda-1.4.14-py3-none-any.whl Python 3 none any Details

Total release size:214.7 kB

Release files / lisa_on_cuda-1.4.14.tar.gz

Download URL lisa_on_cuda-1.4.14.tar.gz
Size 95.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f3c81203a64f99e112910524b6d31e79c9ed7c464f992d0ac05fdfbf96a7bc2e
BLAKE2b-256 checksum
How to use checksums
dda998fb14e0306b0afd388f620b23ed123697117e1c23f0aceb8895de1bbf3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.9 Linux/5.15.167.4-microsoft-standard-WSL2

Release files / lisa_on_cuda-1.4.14-py3-none-any.whl

Download URL lisa_on_cuda-1.4.14-py3-none-any.whl
Size 119.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca1aa90662139b79ac7f2150cd95eee6866435cd72884b21c48c0ba117e58e08
BLAKE2b-256 checksum
How to use checksums
d53d815d96b13d3b4f0cfd2b111ff66e90d14b8f5c565bc6348fbade994cc3e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.9 Linux/5.15.167.4-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

1.4.14 This release

2 release files

1.4.11

2 release files

1.4.10

2 release files

1.4.8

2 release files

1.4.7

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.3

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page