谷歌 Colab , 租 A100
Unable to detect NVIDIA/AMD GPU. Install lspci or lshw to automatically detect and install GPU dependencies. >>> The Ollama API is now available at 127.0.0.1:11434Moresudo apt update && sudo apt install pciutils -y && sudo apt install lshw -y
lspci -v
lshw -v
google colab can not run multiple cells simultaneously
import nest_asyncio
import asyncio
import subprocess
nest_asyncio.apply()
async def run_ollama():
process = subprocess.Popen("ollama serve", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
while True:
await asyncio.sleep(1)
loop = asyncio.get_event_loop()
loop.create_task(run_ollama())