microsoft/TypeAgent

Public

mirrored fromhttps://github.com/microsoft/TypeAgentAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
f46fff4e5103217703b51e27ba3f6405ac000e21

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

python/tts/speechT5/setup.sh

48lines · modecode

1# Copyright (c) Microsoft Corporation.
2# Licensed under the MIT License.
3
4# This file must be used with "source setup.sh" *from bash*
5# you cannot run it directly
6
7RECREATE=0
8
9if [ "$1" = "--help" ]; then
10 echo "Usage: setup [<directory>] [--recreate]"
11 echo "Options:"
12 echo " <directory>: The directory where the virtual environment will be created. Default is ./.venv"
13 echo " --recreate: If specified, the virtual environment will be recreated if it already exists."
14 return
15fi
16
17if [ "$1" = "--recreate" ]; then
18 RECREATE=1
19 shift
20fi
21
22if [ "$1" = "" ]; then
23 DIR=./.venv
24else
25 DIR=$1/.venv
26
27 if [ "$2" = "--recreate" ]; then
28 RECREATE=1
29 fi
30fi
31
32
33if [ $RECREATE = 1 ]; then
34 if [ -d $DIR ]; then
35 rm -rf $DIR
36 fi
37fi
38
39if [ ! -f $DIR/bin/activate ]; then
40 python3 -m venv $DIR
41 source $DIR/bin/activate
42 pip config --site set global.extra-index-url https://download.pytorch.org/whl/cu121
43 pip install -r requirements.txt
44else
45 source $DIR/bin/activate
46fi
47
48
49