-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
83 lines (72 loc) · 1.84 KB
/
build.bat
File metadata and controls
83 lines (72 loc) · 1.84 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
@echo off
echo ========================================
echo OpenHands LLM Enhanced - Setup
echo ========================================
echo.
REM Check if Docker is running
docker --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Docker is not running or not installed.
echo Please start Docker Desktop and try again.
pause
exit /b 1
)
REM Check for .env file
if not exist .env (
if exist .env.example (
echo No .env file found. Creating from .env.example...
copy .env.example .env >nul
echo.
echo IMPORTANT: Edit .env and set your LLM_API_KEY before running!
echo Open .env in any text editor and replace "sk-your-api-key-here"
echo.
pause
exit /b 0
) else (
echo ERROR: No .env or .env.example found.
pause
exit /b 1
)
)
REM Check API key is set
findstr /C:"sk-your-api-key-here" .env >nul 2>&1
if not errorlevel 1 (
echo ERROR: You haven't set your API key yet.
echo Edit .env and replace "sk-your-api-key-here" with your actual key.
echo.
pause
exit /b 1
)
REM Create project directory
if not exist project mkdir project
echo Step 1: Building Docker image...
echo (First build pulls ~2GB base image - may take a few minutes)
echo.
docker compose build
if errorlevel 1 (
echo.
echo ERROR: Docker build failed.
pause
exit /b 1
)
echo.
echo Step 2: Starting...
echo.
docker compose up -d
if errorlevel 1 (
echo.
echo ERROR: Failed to start container.
pause
exit /b 1
)
echo.
echo ========================================
echo OpenHands is starting!
echo Open: http://localhost:3333
echo (First conversation takes a few minutes to build sandbox)
echo ========================================
echo.
echo To stop: docker compose down
echo To view logs: docker logs openhands-llm-app
echo.
pause