!pip install aiohttp pyngrok
import os
import asyncio
from aiohttp import ClientSession
# Set LD_LIBRARY_PATH so the system NVIDIA library becomes preferred
# over the built-in library. This is particularly important for
# Google Colab which installs older drivers
os.environ.update({'LD_LIBRARY_PATH': '/usr/lib64-nvidia'})
async def run(cmd):
'''
'run' is a helper function to run subcommands asynchronously.
'''
print('>>> starting', *cmd)
p = await asyncio.subprocess.create_subprocess_exec(
*cmd,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
)
async def pipe(lines):
async for line in lines:
print(line.strip().decode('utf-8'))
await asyncio.gather(
pipe(p.stdout),
pipe(p.stderr),
)
await asyncio.gather(
run(['ollama', 'serve']),
run(['ngrok', 'http', '--log', 'stderr', '11434']),
)
На которую я подписан, но на странице есть следующее

Как это исправить?
До этого я сделал следующее
!choco install ngrok
!ngrok config add-authtoken -----
!curl https://ollama.ai/install.sh | sh
!command -v systemctl >/dev/null && sudo systemctl stop ollama
Подробнее здесь: https://stackoverflow.com/questions/776 ... laboratory
Мобильная версия