Translate

Usage of Termux on Android Phone.

Download and install Termux and Termux Widget,add the Termux-Widget to your Screen Home,if you want to code on phone you had better install hacker's keyboard:
https://f-droid.org/en/packages/com.termux/
https://f-droid.org/en/packages/com.termux.widget/
https://play.google.com/store/apps/details?id=org.pocketworkstation.pckeyboard
Open the Termux install proot-distro,keep try termux-change-repo until you are able to install proot-distro:
termux-setup-storage
termux-wake-lock
termux-change-repo
pkg update && pkg upgrade
pkg install proot-distro
Install Debian on proot-distro ,copy all below and run:
proot-distro install debian --override-alias conda310
mkdir .shortcuts
user='brian'
echo 'proot-distro login conda310' > .shortcuts/conda310_root.sh
echo "proot-distro login conda310 --user $user" > .shortcuts/conda310_user.sh
echo "proot-distro login conda310 --user $user -- source -- vscode.sh" > .shortcuts/conda31_vscode.sh
echo "proot-distro login conda310 --user $user -- source -- ai.sh" > .shortcuts/conda31_ai.sh
proot-distro login conda310
now you are in the Debian as root,create a user and set password and something for beginning,don't forget you password. copy all below and run :
user='brian'
apt update && apt upgrade
apt install sudo locales
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
sudo locale-gen
adduser $user
gpasswd -a $user sudo
echo "$user ALL=(ALL:ALL) ALL" >> /etc/sudoers
login $user
Now you logined as user ,copy all below and run :
user='brian'
sudo apt update && apt upgrade
sudo apt install curl git wget
curl --output conda.sh
https://repo.anaconda.com/miniconda/Miniconda3-py310_23.3.1-0-Linux-aarch64.sh
sudo bash conda.sh
rm conda.sh
echo 'source /root/miniconda3/bin/activate' > conda
source conda
sudo wget -O- https://aka.ms/install-vscode-server/setup.sh | sh
echo 'source conda && code-server serve-local' > vscode.sh
pip install --upgrade pip
sudo apt install build-essential
conda update conda
conda install psutil
pip install torch torchvision torchaudio
git clone https://github.com/oobabooga/text-generation-webui
cd text-generation-webui
pip install -r requirements.txt
python download-model.py gpt2
cd
echo 'source conda && cd text-generation-webui/ && python server.py --cpu' > ai.sh
Backup and restore is impotent,save lots of time.
proot-distro backup conda310 --output /sdcard/bak/conda310.tar.gz
proot-distro restore /sdcard/bak/conda310.tar.gz
More information about AI ,visit the sites below:
https://github.com/oobabooga/text-generation-webui
https://huggingface.co/

沒有留言:

發佈留言