Add -y to setup_ubuntu_instance.sh commands and update EC2_README
This commit is contained in:
parent
1bfa3a0ea3
commit
5036f3a85f
2 changed files with 51 additions and 31 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
## Creating the EC2 Instance
|
||||||
|
|
||||||
Create an EC2 Instance with the
|
Create an EC2 Instance with the
|
||||||
|
|
||||||
`Ubuntu Image`
|
`Ubuntu Image`
|
||||||
|
|
@ -12,23 +14,51 @@ DON'T FORGET TO ADD
|
||||||
|
|
||||||
Or the evaluation run will run out of space
|
Or the evaluation run will run out of space
|
||||||
|
|
||||||
--------------------------------------------------------
|
Add a key pair login where you have access to the corresponding key file (*.pem)
|
||||||
|
|
||||||
Then ssh into the instance, run
|
## Accessing your instance and setup
|
||||||
|
|
||||||
source evals/cloud/setup_ubuntu_instance.sh
|
To ssh into the instance, you have to save your key pair file (*.pem) to an appropriate location, such as ~/.aws. After launching the instance, you can access the Instance Summary, and retrieve "Public IPv4 DNS" address. Then run
|
||||||
|
|
||||||
|
`ssh -i PATH_TO_KEY ubuntu@IPv4ADDRESS`
|
||||||
|
|
||||||
|
to gain command line access to the instance.
|
||||||
|
|
||||||
|
To copy your current state of cognee, go to the folder that contains "cognee" on your local machine, zip it to cognee.zip and run:
|
||||||
|
|
||||||
|
`zip -r cognee.zip cognee`
|
||||||
|
`scp -i PATH_TO_KEY cognee.zip ubuntu@IPv4ADDRESS:cognee.zip`
|
||||||
|
|
||||||
|
And unzip cognee.zip in your SSH session:
|
||||||
|
|
||||||
|
`sudo apt install unzip`
|
||||||
|
`unzip cognee.zip`
|
||||||
|
|
||||||
|
Then run:
|
||||||
|
`cd cognee`
|
||||||
|
`source evals/cloud/setup_ubuntu_instance.sh`
|
||||||
|
|
||||||
sudo usermod -aG docker $USER
|
sudo usermod -aG docker $USER
|
||||||
|
|
||||||
disconnect, and reconnect.
|
disconnect, and reconnect.
|
||||||
|
|
||||||
|
Confirm that `ubuntu` has been added to the docker user group with
|
||||||
|
|
||||||
|
`groups | grep docker`
|
||||||
|
|
||||||
|
## Running SWE-bench
|
||||||
|
|
||||||
Then enter a `screen` and activate the virtual env
|
Then enter a `screen` and activate the virtual env
|
||||||
|
|
||||||
screen
|
`screen`
|
||||||
source venv/bin/activate
|
`source venv/bin/activate`
|
||||||
|
|
||||||
then, from cognee, you can run swe_bench:
|
then, from cognee, you can run swe_bench:
|
||||||
|
|
||||||
python evals/eval_swe_bench --cognee_off --max_workers=N_CPUS
|
`cd cognee`
|
||||||
|
|
||||||
Building the environment images takes roughly 17 minutes
|
`python evals/eval_swe_bench.py --cognee_off --max_workers=N_CPUS`
|
||||||
|
|
||||||
|
Building the environment images should take roughly 17 minutes
|
||||||
|
|
||||||
|
If the virtual env wasn't set up correctly for some reason, just run the last few lines of `setup_ubuntu_instance.sh` manually
|
||||||
|
|
@ -1,43 +1,33 @@
|
||||||
|
sudo apt-get update -y
|
||||||
sudo apt-get update
|
sudo apt-get install -y ca-certificates curl
|
||||||
sudo apt-get install ca-certificates curl
|
|
||||||
sudo install -m 0755 -d /etc/apt/keyrings
|
sudo install -m 0755 -d /etc/apt/keyrings
|
||||||
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
||||||
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||||
|
|
||||||
# Add the repository to Apt sources:
|
# Add the repository to Apt sources:
|
||||||
echo \
|
echo \
|
||||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
||||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
sudo apt-get update
|
sudo apt-get update -y
|
||||||
|
|
||||||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||||
|
|
||||||
sudo docker run hello-world
|
sudo docker run hello-world
|
||||||
|
|
||||||
sudo apt install unzip
|
sudo apt install -y unzip
|
||||||
|
|
||||||
sudo apt-get install python3-virtualenv
|
sudo apt-get install -y python3-virtualenv
|
||||||
|
|
||||||
sudo add-apt-repository ppa:deadsnakes/ppa
|
sudo add-apt-repository -y ppa:deadsnakes/ppa
|
||||||
sudo apt update
|
|
||||||
|
|
||||||
sudo apt install python3.11
|
sudo apt update -y
|
||||||
|
|
||||||
|
sudo apt install -y python3.11
|
||||||
|
|
||||||
virtualenv venv --python=python3.11
|
virtualenv venv --python=python3.11
|
||||||
|
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
|
|
||||||
pip install poetry
|
pip install poetry
|
||||||
|
|
||||||
poetry install
|
poetry install
|
||||||
|
pip install swebench transformers sentencepiece datasets tiktoken protobuf
|
||||||
pip install swebench transformers sentencepiece
|
|
||||||
|
|
||||||
groups | grep docker
|
|
||||||
|
|
||||||
python evals/eval_swe_bench.py --cognee_off
|
|
||||||
|
|
||||||
sudo usermod -aG docker $USER
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue