JupyterHub GPU Resource Usage Analyzer
Project description
GPU Resource Analysis Service
Sponsored by Enverge.ai - Simpler, greener, cheaper AI training platform. Enverge harnesses excess green energy for powerful, cost-effective computing on GPUs, enabling environmentally friendly AI model development, training, and fine-tuning. Currently in private alpha with limited spots available.
API endpoint to analyze PyTorch code for GPU resource usage.
Setup
- Install dependencies:
pip install -r requirements.txt
- Configure in
jupyterhub_config.py:
c.JupyterHub.services = [
{
'name': 'gpu-check',
'url': 'http://127.0.0.1:8005',
'command': ['python', '-m', 'gpu_check.gpu_check_service'],
'environment': {
'JUPYTERHUB_SERVICE_PREFIX': '/services/gpu-check',
'JUPYTERHUB_SERVICE_PORT': '8005'
}
}
]
API
POST /services/gpu-check
Analyzes PyTorch code for GPU resource usage.
Request:
{
"code": "your_python_code_here"
}
Response:
{
"has_resource_usage": true,
"operations": {
"compute": ["operation1", "operation2"],
"memory": ["operation1", "operation2"],
"transfer": ["operation1", "operation2"],
"query": ["operation1", "operation2"]
},
"device_variables": ["variable1", "variable2"],
"error": null
}
Usage in JupyterLab Extension
The service can be accessed from your JupyterLab extension using the authenticated endpoint:
const response = await fetch('/services/gpu-check', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ code: 'your_code_here' })
});
const result = await response.json();
GET /health
Health check endpoint.
Response:
{
"status": "healthy"
}
API Documentation
Once the server is running, you can access the interactive API documentation at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupyterhub_enverge_gpu_check-0.0.2.tar.gz.
File metadata
- Download URL: jupyterhub_enverge_gpu_check-0.0.2.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23589cad6a0ad6e453bad5669c7c2f50368b32e7ca10a4c8845c170c7e841be9
|
|
| MD5 |
2e5d514187fd07be438748e8e15ab213
|
|
| BLAKE2b-256 |
b5e5321ba0e177f1e997ba3f69e39e5651087b5f498c589be272821a5d42aaea
|
File details
Details for the file jupyterhub_enverge_gpu_check-0.0.2-py3-none-any.whl.
File metadata
- Download URL: jupyterhub_enverge_gpu_check-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
470b367f81386810d64f70b8a0c679213f309f5d97052337c3eb335f00127814
|
|
| MD5 |
987d3472ae2ed5099638915fdf894be2
|
|
| BLAKE2b-256 |
a413734aaf798ff41258c09e5cded5b4d70d23ed3d209fbdd9094e792433bfce
|