-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrunme.bat
64 lines (44 loc) · 1.74 KB
/
runme.bat
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
@echo off
rem Set the version of Miniconda to download
set VERSION=latest
rem Set the URL to download the latest Miniconda installer
set URL=https://repo.anaconda.com/miniconda/Miniconda3-%VERSION%-Windows-x86_64.exe
rem Set the name of the installer file
set FILENAME=Miniconda3-%VERSION%-Windows-x86_64.exe
rem Set the installation path
set INSTALL_PATH=%USERPROFILE%\Miniconda3
set CONDA_EXE=%INSTALL_PATH%\Scripts\conda.exe
set CONDA_BAT=%INSTALL_PATH%\condabin\conda.bat
set CONDA_ACT=%INSTALL_PATH%\Scripts\activate.bat
set CONDA_ENV_NAME=stablelm
if exist "%UserProfile%\Miniconda3" (
echo Miniconda is already installed.
) else (
rem Download the latest Miniconda installer using curl
echo Downloading Miniconda installer...
curl -o %FILENAME% %URL%
rem Install Miniconda silently
echo Installing Miniconda...
start /wait "" "%FILENAME%" /S /D="%INSTALL_PATH%"
echo Init Conda shell...
call "%CONDA_EXE%" init cmd.exe
echo Adding Conda channels...
call "%CONDA_BAT%" config --add channels conda-forge
call "%CONDA_BAT%" config --add channels pytorch
echo Installing dependencies..
call "%CONDA_BAT%" env create --file environment.yml
rem call "%CONDA_BAT%" install --yes pytorch
rem call "%CONDA_BAT%" install --yes torchvision
rem call "%CONDA_BAT%" install --yes torchaudio
rem call "%CONDA_BAT%" install --yes torchaudio
rem call "%CONDA_BAT%" install --yes cudatoolkit=11.4
rem call "%CONDA_BAT%" install --yes transformers
rem Cleanup
echo Cleaning up...
del "%FILENAME%"
rem Print message when installation is complete
echo Miniconda is now installed at %INSTALL_PATH%.
)
rem echo Installing dependencies..
rem call "%CONDA_BAT%" install --yes pytorch transformers torchvision torchaudio cudatoolkit
cmd "/k activate stablelm && python chat.py"