Spaces:
Sleeping
Sleeping
Create install.bat
Browse files- install.bat +56 -0
install.bat
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@echo off
|
2 |
+
|
3 |
+
rem -------------------------------------------
|
4 |
+
rem NOT guaranteed to work on Windows
|
5 |
+
|
6 |
+
set REPOS=https://huggingface.co/spaces/aka7774/whisper
|
7 |
+
set APPDIR=whisper
|
8 |
+
set VENV=venv
|
9 |
+
|
10 |
+
rem -------------------------------------------
|
11 |
+
|
12 |
+
set INSTALL_DIR=%~dp0
|
13 |
+
cd /d %INSTALL_DIR%
|
14 |
+
|
15 |
+
:git_clone
|
16 |
+
set DL_URL=%REPOS%
|
17 |
+
set DL_DST=whisper
|
18 |
+
git clone %DL_URL% %APPDIR%
|
19 |
+
if exist %DL_DST% goto install_python
|
20 |
+
|
21 |
+
set DL_URL=https://github.com/git-for-windows/git/releases/download/v2.41.0.windows.3/PortableGit-2.41.0.3-64-bit.7z.exe
|
22 |
+
set DL_DST=PortableGit-2.41.0.3-64-bit.7z.exe
|
23 |
+
curl -L -o %DL_DST% %DL_URL%
|
24 |
+
if not exist %DL_DST% bitsadmin /transfer dl %DL_URL% %DL_DST%
|
25 |
+
%DL_DST% -y
|
26 |
+
del %DL_DST%
|
27 |
+
|
28 |
+
set GIT=%INSTALL_DIR%PortableGit\bin\git
|
29 |
+
%GIT% clone %REPOS%
|
30 |
+
|
31 |
+
:install_python
|
32 |
+
set DL_URL=https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.10.13+20240107-i686-pc-windows-msvc-shared-install_only.tar.gz
|
33 |
+
set DL_DST="%INSTALL_DIR%python.tar.gz"
|
34 |
+
curl -L -o %DL_DST% %DL_URL%
|
35 |
+
if not exist %DL_DST% bitsadmin /transfer dl %DL_URL% %DL_DST%
|
36 |
+
tar -xzf %DL_DST%
|
37 |
+
|
38 |
+
set PYTHON=%INSTALL_DIR%python\python.exe
|
39 |
+
set PATH=%PATH%;%INSTALL_DIR%python310\Scripts
|
40 |
+
|
41 |
+
:install_venv
|
42 |
+
cd %APPDIR%
|
43 |
+
%PYTHON% -m venv %VENV%
|
44 |
+
set PYTHON=%VENV%\Scripts\python.exe
|
45 |
+
|
46 |
+
:install_pip
|
47 |
+
set DL_URL=https://bootstrap.pypa.io/get-pip.py
|
48 |
+
set DL_DST=%INSTALL_DIR%get-pip.py
|
49 |
+
curl -o %DL_DST% %DL_URL%
|
50 |
+
if not exist %DL_DST% bitsadmin /transfer dl %DL_URL% %DL_DST%
|
51 |
+
%PYTHON% %DL_DST%
|
52 |
+
|
53 |
+
%PYTHON% -m pip install gradio
|
54 |
+
%PYTHON% -m pip install -r requirements.txt
|
55 |
+
|
56 |
+
pause
|