All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
36.27k stars 4.13k forks source link

it is run on colab #4917

Open werruww opened 1 day ago

werruww commented 1 day ago

!pip install udocker

!udocker --allow-root install

!udocker --allow-root pull docker.all-hands.dev/all-hands-ai/openhands:main

!udocker --allow-root run docker.all-hands.dev/all-hands-ai/openhands:main

ollama on colab

!pip install colab-xterm #https://pypi.org/project/colab-xterm/ %load_ext colabxterm

%xterm

!curl -fsSL https://ollama.com/install.sh | sh

!pip install pyngrok

from pyngrok import ngrok

Set the authentication token

ngrok.set_auth_token("xxxxxxxxxxxxxxxxxxxxxxx")

Open an ngrok tunnel to the Gazebo server port (11345)

public_url = ngrok.connect(3000) print("Public URL:", public_url)

werruww commented 1 day ago

from pyngrok import ngrok ngrok.set_auth_token("xxxxxxxxxxxxxxxxxxxxxxx") public_url = ngrok.connect(3000) print("Public URL:", public_url)

werruww commented 1 day ago

Untitled

werruww commented 1 day ago

Unti2tled Unti3tled

werruww commented 1 day ago

Un4titled

werruww commented 1 day ago

error

werruww commented 1 day ago

nneed python 3.12

pytjhon colab 3.10

إنشاء بيئة Python 3.12

!/usr/local/miniconda/bin/conda create -y -n openhands_env python=3.12

تشغيل الأمر داخل بيئة openhands_env

!/usr/local/miniconda/bin/conda run -n openhands_env python --version

تثبيت مكتبة معينة داخل البيئة

!/usr/local/miniconda/bin/conda run -n openhands_env pip install library_name

تشغيل كود Python داخل البيئة

!/usr/local/miniconda/bin/conda run -n openhands_env python your_script.py

werruww commented 1 day ago

تحميل وتثبيت Miniconda

!wget -O miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh !bash miniconda.sh -b -p /usr/local/miniconda

إنشاء بيئة Python 3.12

!/usr/local/miniconda/bin/conda create -y -n openhands_env python=3.12

تفعيل البيئة بشكل مباشر

!source /usr/local/miniconda/etc/profile.d/conda.sh && conda activate openhands_env

werruww commented 1 day ago

!pip install -q condacolab import condacolab condacolab.install()

!conda install -c conda-forge python=3.12

werruww commented 1 day ago

Unt5itled

werruww commented 1 day ago

There are errors, and the form did not run, and I think the name of the form is wrong. Also, the Python version is an error that must be downloaded through Conda. It does not matter that Docker contener ran in Colab.