-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·62 lines (48 loc) · 1.44 KB
/
update.sh
File metadata and controls
executable file
·62 lines (48 loc) · 1.44 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
set -e
echo "========================================================================="
echo ""
echo " ABUS Updater [Version 3.0]"
echo " contact: abus.aikorea@gmail.com"
echo ""
echo "========================================================================="
echo ""
# Get script directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
# Check for spaces in path
if [[ "$SCRIPT_DIR" =~ [[:space:]] ]]; then
echo "This script relies on Miniconda which can not be silently installed under a path with spaces."
exit 1
fi
# Setup paths
INSTALL_DIR="$SCRIPT_DIR/installer_files"
CONDA_ROOT_PREFIX="$INSTALL_DIR/conda"
INSTALL_ENV_DIR="$INSTALL_DIR/env"
# Set temp directories
export TMP="$INSTALL_DIR"
export TEMP="$INSTALL_DIR"
# Check if conda exists
if [ ! -f "$CONDA_ROOT_PREFIX/bin/conda" ]; then
echo "Conda not found. Please run start-voice.sh first to set up the environment."
exit 1
fi
# Environment isolation
export PYTHONNOUSERSITE=1
export PYTHONPATH=
export PYTHONHOME=
export CUDA_PATH="$INSTALL_ENV_DIR"
export CUDA_HOME="$CUDA_PATH"
# Activate conda environment
CONDA_SH_PATH="$CONDA_ROOT_PREFIX/etc/profile.d/conda.sh"
if [ ! -f "$CONDA_SH_PATH" ]; then
echo "Miniconda hook not found."
exit 1
fi
source "$CONDA_SH_PATH"
conda activate "$INSTALL_ENV_DIR"
cd "$SCRIPT_DIR"
export LOG_LEVEL=DEBUG
python start-abus.py voice --update
echo "Pip update process completed."
echo ""