forked from techfish-11/SwiftlyTTS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
44 lines (35 loc) · 1.11 KB
/
install.sh
File metadata and controls
44 lines (35 loc) · 1.11 KB
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
#!/bin/bash
set -e
echo "=== SwiftlyTTS Linux Install Script ==="
# 1. Python 3.11+ のインストール(Ubuntu/Debian系例)
if ! command -v python3.11 &>/dev/null; then
echo "[*] Python 3.11 not found. Installing (Ubuntu/Debian only)..."
sudo apt update
sudo apt install -y python3.11 python3.11-venv python3.11-dev
fi
# 2. venv作成
if [ ! -d ".venv" ]; then
echo "[*] Creating Python venv (.venv)..."
python3.11 -m venv .venv
fi
# 3. venv有効化
source .venv/bin/activate
# 4. pipアップグレード & 必要パッケージ
pip install --upgrade pip
pip install -r requirements.txt
# 5. Rust toolchainインストール
if ! command -v cargo &>/dev/null; then
echo "[*] Installing Rust toolchain..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
fi
# 6. maturinインストール
pip install maturin
# 7. Rustバインディングビルド
echo "[*] Building Rust FFI (lib/rust_lib)..."
cd lib/rust_lib
maturin develop
cd ../..
echo "=== Install completed! ==="
echo "仮想環境有効化: source .venv/bin/activate"
echo "Bot起動: python bot.py"