Jupyter Notebook with GPU and Code Server!
Current manifests only applicable for Azure Kubernetes Service and AWS EKS.
Why Kubernetes? Spot auto respawn!
Why domain is mesolitica.com? Because currently Malaysia-AI sponsored by https://mesolitica.com/ !
The server is protected by Github Oauth.
At https://jupyter.app.mesolitica.com, this server is to train the models and dataset preprocessing.
Currently we use https://learn.microsoft.com/en-us/azure/virtual-machines/nc-a100-v4-series
Standard_NC24ads_A100_v4,
Standard_NC48ads_A100_v4,
Standard_NC96ads_A100_v4,
At https://jupyter-serve.app.mesolitica.com, this server is to serve the model using API and Chatbot interface.
You can! If you have a good idea, like, Full Parameter Finetuning Multimodal Vision + Speech + Text, we can spawn more than 1 node 4x A100s, after that you can use Torch Distributed or Ray Cluster.
You can! I know, deduping or distributed crawling or distributed something use a lot of CPU and RAM.
Because the instance is spot based, so it can be killed any time (between 1 day - 6 days), so we have to prepare the script to auto respawn,
pm2 start "python3 /dir/script.py"
pm2 save
Sometime GPU is not able detect for some reason, so we have to force restart the pod, to do it inside the pod,
kill -15 1
So this will kill Jupyter Notebook and force Kubernetes to restart the pod.
About GPU not able to detect, can read more at https://github.com/Azure/AKS/issues/3680
If you run any webserver inside jupyter server,
from fastapi import FastAPI
app = FastAPI()
@app.get('/')
async def get():
return 'hello'
import asyncio
import uvicorn
if __name__ == "__main__":
config = uvicorn.Config(app)
server = uvicorn.Server(config)
await server.serve()
You can access the webserver at https://jupyter.app.mesolitica.com/proxy/{port}/
Go to https://jupyter.app.mesolitica.com/vscode/
sudo apt install python3.10-venv -y
python3 -m venv my-env
~/my-env/bin/pip3 install wheel
~/my-env/bin/pip3 install ipykernel
~/my-env/bin/python3 -m ipykernel install --user --name=my-env
my-env
to any name.~/my-env/bin/pip3 install library
In terminal or jupyter cell.