-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
114 lines (90 loc) · 3.74 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/bash
# Install system dependencies
sudo apt update
sudo apt install -y build-essential gcc g++ make cmake python3 python3-pip python3-venv ffmpeg libsndfile1 portaudio19-dev python3-dev unrar p7zip-full libgl1-mesa-glx libasound2-dev
# Install Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh -b -p /root/miniconda3
# Initialize conda in the current shell
eval "$(/root/miniconda3/bin/conda shell.bash hook)"
# Initialize conda for future shell sessions
/root/miniconda3/bin/conda init bash
# Source bashrc to ensure conda commands are available
source ~/.bashrc
# Create conda environment
conda create -n aetherchat python=3.10 -y
# Activate conda environment
source /root/miniconda3/bin/activate aetherchat
# Verify we're in the right environment
echo "Python location: $(which python)"
echo "Python version: $(python --version)"
echo "Current conda env: $CONDA_DEFAULT_ENV"
# Install pip 24.0 first
pip install pip==24.0
# Create directory structure
mkdir -p /root/models
mkdir -p /root/output
mkdir -p /root/input
mkdir -p /root/Kobold
mkdir -p /root/templates
mkdir -p /root/db
# Download KoboldCPP
cd /root/Kobold
wget -O koboldcpp https://github.com/LostRuins/koboldcpp/releases/download/v1.79.1/koboldcpp-linux-x64-cuda1210
chmod +x koboldcpp
mkdir models
cd models
wget --content-disposition https://huggingface.co/mradermacher/DevQuasar-R1-Uncensored-Llama-8B-i1-GGUF/resolve/main/DevQuasar-R1-Uncensored-Llama-8B.i1-Q4_K_M.gguf
cd ..
mkdir sd
wget -O sdxlYamersRealisticNSFW_v5TX.safetensors https://huggingface.co/misri/sdxlYamersRealisticNSFW_v5TX/resolve/main/sdxlYamersRealisticNSFW_v5TX.safetensors
cd /root
# Clone repository and setup files
git clone https://github.com/nexusjuan12/AetherChat.git /root/main
cp main/env_backup_root /root/.env
cp -r main/templates /root/
cp main/webserver.py /root/
cp main/model_cache.py /root/
cp main/queue_system.py /root/
cp -r main/db /root/
chmod 644 /root/db/users.db
chown root:root /root/db/users.db
# Install PyTorch in the conda environment
pip install torch==2.5.1+cu121 torchvision==0.20.1+cu121 torchaudio==2.5.1+cu121 --index-url https://download.pytorch.org/whl/cu121
# Install RVC and TTS in the conda environment
python -m pip install git+https://github.com/Atm4x/tts-with-rvc.git#egg=tts_with_rvc
python -m pip install git+https://github.com/Atm4x/rvc-lib.git@dev#egg=rvc
python -m pip install -e git+https://github.com/Atm4x/rvc-lib.git#egg=rvclib
python -m pip install git+https://github.com/Atm4x/rvc-tts-pipeline-fix.git@dev#egg=rvc_tts_pipe
# Install remaining requirements in the conda environment
pip install -r /root/main/requirements.txt
# Install huggingface_hub for model downloads
pip install huggingface_hub
# Python script to download Hugging Face models
python3 - <<EOF
from huggingface_hub import snapshot_download
# Define repository and download location
repo_id = "nexusjuan/Aetherchat"
local_dir = "/root/"
# Download the repository's contents
snapshot_download(repo_id, local_dir=local_dir, repo_type="model")
EOF
cp models/rmvpe.pt /root/
cp models/hubert_base.pt /root/
# Copy start.sh to the root directory and make it executable
cp /root/main/start.sh /root/
chmod +x /root/start.sh
# Add instruction to start AetherChat
echo -e "\nTo start AetherChat, run the following command:"
echo "./start.sh"
# Print final environment info
echo "Installation complete. Final environment check:"
echo "Python location: $(which python)"
echo "Pip location: $(which pip)"
echo "Python version: $(python --version)"
echo "Current conda env: $CONDA_DEFAULT_ENV"
# Display activation instructions
echo -e "\nTo activate the conda environment, run:"
echo "source ~/.bashrc"
echo "conda activate aetherchat"