-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup_environment_en.bat
More file actions
62 lines (51 loc) · 1.75 KB
/
Copy pathsetup_environment_en.bat
File metadata and controls
62 lines (51 loc) · 1.75 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
61
62
@echo off
REM GPT-OSS B20 Local Execution Environment Setup
REM Python 3.12 + PyTorch CUDA Environment
echo ========================================
echo GPT-OSS B20 Environment Setup
echo ========================================
REM Check virtual environment
if not exist "venv-gpt-oss\Scripts\activate.bat" (
echo ❌ Virtual environment not found
echo 📋 Please create environment with:
echo py -3.12 -m venv venv-gpt-oss
pause
exit /b 1
)
REM Activate virtual environment
echo 🔧 Activating virtual environment...
call venv-gpt-oss\Scripts\activate.bat
REM Check Python environment
echo 📋 Python environment check:
python --version
echo.
REM Check installed libraries
echo 📦 Checking installed libraries:
python -c "
try:
import torch; print('✅ PyTorch:', torch.__version__)
except: print('❌ PyTorch not installed')
try:
import transformers; print('✅ Transformers:', transformers.__version__)
except: print('❌ Transformers not installed')
try:
import accelerate; print('✅ Accelerate:', accelerate.__version__)
except: print('❌ Accelerate not installed')
print('🚀 CUDA Available:', torch.cuda.is_available() if 'torch' in locals() else 'Unknown')
"
echo.
echo ========================================
echo 🎯 Usage:
echo Basic test: python test_gpt_oss_en.py
echo Environment check: python -c "import torch; print(torch.cuda.is_available())"
echo ========================================
echo.
REM Ask to run test script automatically
set /p choice="Run test script now? (y/n): "
if /i "%choice%"=="y" (
echo 🚀 Running GPT-OSS test...
python test_gpt_oss_en.py
) else (
echo 💡 To run test later: python test_gpt_oss_en.py
)
pause