1+ # OpenTuneWeaver Environment Configuration
2+ # Copy this file to .env and adjust the values
3+
4+ # ==================================================
5+ # API Configuration (Required)
6+ # ==================================================
7+
8+ # For Ollama (local or remote)
9+ OPENAI_API_BASE = http://localhost:11434/v1
10+ OPENAI_API_KEY = ollama
11+ OPENAI_MODEL = gemma3:12b-it-qat
12+
13+ # For vLLM
14+ # OPENAI_API_BASE=http://vllm-server:8000/v1
15+ # OPENAI_API_KEY=token-abc123
16+ # OPENAI_MODEL=meta-llama/Llama-3-8B-Instruct
17+
18+ # For LocalAI
19+ # OPENAI_API_BASE=http://localhost:8080/v1
20+ # OPENAI_API_KEY=sk-localai
21+ # OPENAI_MODEL=ggml-gpt4all-j
22+
23+ # For OpenAI
24+ # OPENAI_API_BASE=https://api.openai.com/v1
25+ # OPENAI_API_KEY=sk-your-openai-api-key
26+ # OPENAI_MODEL=gpt-4
27+
28+ # For Anthropic Claude (via proxy)
29+ # OPENAI_API_BASE=http://claude-proxy:8000/v1
30+ # OPENAI_API_KEY=sk-ant-your-key
31+ # OPENAI_MODEL=claude-3-opus-20240229
32+
33+ # ==================================================
34+ # Alternative API Variable Names (Optional)
35+ # ==================================================
36+ # Some systems use these instead
37+ # API_BASE_URL=${OPENAI_API_BASE}
38+ # API_KEY=${OPENAI_API_KEY}
39+ # MODEL_NAME=${OPENAI_MODEL}
40+
41+ # ==================================================
42+ # HuggingFace Configuration (Optional)
43+ # ==================================================
44+ # For downloading and uploading models
45+ HF_TOKEN = hf_your_read_token_here
46+ HF_WRITE_TOKEN = hf_your_write_token_here
47+
48+ # HuggingFace Cache Directory (optional)
49+ # HF_HOME=/app/cache/huggingface
50+
51+ # ==================================================
52+ # Application Settings
53+ # ==================================================
54+
55+ # Gradio Web Interface
56+ GRADIO_SERVER_NAME = 0.0.0.0
57+ GRADIO_SERVER_PORT = 8080
58+ GRADIO_SHARE = false
59+
60+ # Application Port (Docker)
61+ PORT = 8080
62+
63+ # ==================================================
64+ # GPU Configuration (Optional)
65+ # ==================================================
66+
67+ # CUDA Device Selection
68+ # Single GPU: "0" | Multiple GPUs: "0,1" | CPU only: ""
69+ CUDA_VISIBLE_DEVICES = 0
70+
71+ # Mixed Precision Training
72+ # MIXED_PRECISION=fp16
73+
74+ # ==================================================
75+ # Training Configuration (Optional)
76+ # ==================================================
77+
78+ # Model Settings
79+ # BASE_MODEL=unsloth/gemma-3n-E2B-it
80+ # MAX_SEQ_LENGTH=2048
81+ # LOAD_IN_4BIT=true
82+
83+ # Training Hyperparameters
84+ # LEARNING_RATE=5e-5
85+ # NUM_TRAIN_EPOCHS=3
86+ # BATCH_SIZE=1
87+ # GRADIENT_ACCUMULATION_STEPS=8
88+
89+ # LoRA Configuration
90+ # LORA_R=8
91+ # LORA_ALPHA=8
92+ # LORA_DROPOUT=0
93+
94+ # ==================================================
95+ # Paths and Storage (Optional)
96+ # ==================================================
97+
98+ # Data directories (for Docker volumes)
99+ # DATA_DIR=./data
100+ # MODELS_DIR=./models
101+ # LOGS_DIR=./logs
102+ # CACHE_DIR=./cache
103+
104+ # ==================================================
105+ # Feature Flags (Optional)
106+ # ==================================================
107+
108+ # Enable/Disable Features
109+ # ENABLE_TELEMETRY=true
110+ # ENABLE_CACHE=true
111+ # ENABLE_DEBUG=false
112+ # USE_EXTERNAL_API=true
113+
114+ # ==================================================
115+ # Network Configuration (Docker)
116+ # ==================================================
117+
118+ # For accessing host services from Docker
119+ # Linux: Use actual IP (e.g., 192.168.1.100)
120+ # Mac/Windows: Use host.docker.internal
121+ # HOST_ADDRESS=host.docker.internal
122+
123+ # ==================================================
124+ # Logging and Monitoring
125+ # ==================================================
126+
127+ # Log Level: DEBUG, INFO, WARNING, ERROR
128+ # LOG_LEVEL=INFO
129+
130+ # Log File Settings
131+ # LOG_TO_FILE=true
132+ # LOG_FILE_PATH=/app/logs/opentuneweaver.log
133+
134+ # ==================================================
135+ # Security (Optional)
136+ # ==================================================
137+
138+ # API Rate Limiting
139+ # RATE_LIMIT_ENABLED=false
140+ # RATE_LIMIT_PER_MINUTE=60
141+
142+ # CORS Settings
143+ # CORS_ENABLED=true
144+ # CORS_ORIGINS=*
145+
146+ # ==================================================
147+ # Development Settings (Optional)
148+ # ==================================================
149+
150+ # Development Mode
151+ # DEV_MODE=false
152+ # HOT_RELOAD=false
153+ # DEBUG=false
154+
155+ # ==================================================
156+ # Docker Compose Specific (Optional)
157+ # ==================================================
158+
159+ # Container Resource Limits
160+ # CONTAINER_MEMORY_LIMIT=16G
161+ # CONTAINER_CPU_LIMIT=4
162+
163+ # Restart Policy
164+ # RESTART_POLICY=unless-stopped
165+
166+ # ==================================================
167+ # Notes:
168+ # ==================================================
169+ # 1. Never commit the actual .env file to git
170+ # 2. Keep your API keys secure
171+ # 3. Adjust paths based on your setup
172+ # 4. GPU settings require NVIDIA Docker runtime
173+ # ==================================================
0 commit comments