-
AndroidWorld 설치를 위한 환경설정카테고리 없음 2024. 8. 24. 18:48
그림 1: AndroidWorld [Code repository]: https://github.com/google-research/android_world
GitHub - google-research/android_world: AndroidWorld is an environment and benchmark for autonomous agents
AndroidWorld is an environment and benchmark for autonomous agents - google-research/android_world
github.com
안드로이드 월드는 컴퓨터를 제어하는 인공지능 연구를 위한 벤치마크입니다. 이 환경은 본래 리눅스 또는 macOS에서 동작하도록 개발되었습니다. 윈도우에서 이 환경을 실행시키려면 추가적인 설정들이 필요합니다.
1. WSL2 설치
https://learn.microsoft.com/ko-kr/windows/wsl/install
WSL 설치
wsl --install 명령을 사용하여 Linux용 Windows 하위 시스템을 설치합니다. Ubuntu, Debian, SUSE, Kali, Fedora, Pengwin, Alpine 등 원하는 Linux 배포판에서 실행되는 Windows 머신에서 Bash 터미널을 사용할 수 있습니
learn.microsoft.com
위 링크 참고.
2. AndroidStudio 설치
https://developer.android.com/studio 링크로 들어가서 화면 스크롤을 내리면 다음과 같이 운영체제별로 android studio를 다운받을 수 있습니다.
Linux 버전을 눌러서 체크 표시를 하고 다운로드 버튼에 오른쪽 마우스를 클릭하면 주소를 복사할 수 있습니다.
복사된 주소를 WSL의 터미널 상에서 wget을 통해 다운로드 받아줍니다.
이제 Applications 라는 폴더를 만들어서 해당 폴더에 압축파일을 풉니다.
cd mkdir ~/Applications && cd ~/Applications tar xfv $(ls -1t ~/Downloads/android-studio-* | head -n1)
아래 명령어를 bashrc 파일에 등록해놓으면 편하게 터미널에서 android studio를 실행할 수 있습니다.
alias android-studio=~/Applications/android-studio/bin/studio.sh
3. Nested virtuialization 설정
1) 사용자를 kvm 그룹에 추가합니다.
sudo usermod -a -G kvm ${USER}
2) vim이나 nano 같은 텍스트 에디터를 열어서 wsl.conf 파일을 아래와 같이 수정합니다.
vim /etc/wsl.conf
# wsl.conf [boot] command = /bin/bash -c 'chown -v root:kvm /dev/kvm && chmod 660 /dev/kvm' [wsl2] nestedVirtualization=true
이제 아래 명령어를 통해 wsl을 재부팅하거나 윈도우를 재부팅 해줍니다. 그리고 android studio를 실행합니다.
wsl.exe --shutdown
4. SDK 다운로드 및 Android Virtual Device 설정
android studio 에서 상단 메뉴 중 Tools를 누르고 SDK Manager를 실행합니다. 그리고 Android 13.0 Tiramisu에 체크를 하고 OK를 눌러 설치를 진행합니다.
이후, 다시 Tools에서 Device Manager를 실행합니다. 그리고 Create Virtual Device를 눌러서 새로운 디바이스를 생성합니다.
이때, Pixel 6, Tiramisu를 선택해야 합니다.
AVD name은 AndroidWorldAvd로 설정합니다. Finish를 눌러 생성을 완료하고 bashrc 파일에서 AVD 경로와 실행 명령어를 아래와 같이 설정합니다. Sdk 폴더의 경로가 사용자마다 다를 수 있으니 주의하세요.
vim ~/.bashrc # .bashrc EMULATOR_NAME=AndroidWorldAvd alias avd='~/Android/Sdk/emulator/emulator -avd $EMULATOR_NAME -no-snapshot -grpc 8554'
이후 터미널에서 avd를 입력하면 emulator가 실행됩니다.
5. 가상환경 생성, AndroidEnv 및 AndroidWorld 설치
아래 링크 참고
https://github.com/google-research/android_world
GitHub - google-research/android_world: AndroidWorld is an environment and benchmark for autonomous agents
AndroidWorld is an environment and benchmark for autonomous agents - google-research/android_world
github.com
6. Model provider API 등록
# Add to .bashrc. export OPENAI_API_KEY=your-key export GCP_API_KEY=your-key
[References]
https://serverfault.com/questions/1043441/how-to-run-kvm-nested-in-wsl2-or-vmware
How to run KVM nested in WSL2 (or vmware)?
I'm trying to follow this tutorial to run KVM nested in WSL 2, but after following the directions through compiling the kernel and loading it, the test kvm-ok reports that KVM is not supported. I've
serverfault.com