Skip to content

Commit 05d7743

Browse files
committed
Add Docker support with GitHub Actions
1 parent 1845f8c commit 05d7743

File tree

6 files changed

+1320
-0
lines changed

6 files changed

+1320
-0
lines changed

.dockerignore

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Git
2+
.git
3+
.gitignore
4+
.github
5+
*.md
6+
7+
# Python
8+
__pycache__
9+
*.py[cod]
10+
*$py.class
11+
*.so
12+
.Python
13+
env/
14+
venv/
15+
ENV/
16+
build/
17+
develop-eggs/
18+
dist/
19+
downloads/
20+
eggs/
21+
.eggs/
22+
lib/
23+
lib64/
24+
parts/
25+
sdist/
26+
var/
27+
wheels/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
MANIFEST
32+
.pytest_cache/
33+
.coverage
34+
htmlcov/
35+
.tox/
36+
.hypothesis/
37+
38+
# Jupyter Notebooks
39+
.ipynb_checkpoints
40+
*.ipynb
41+
42+
# IDE
43+
.vscode/
44+
.idea/
45+
*.swp
46+
*.swo
47+
*~
48+
.DS_Store
49+
50+
# Project specific
51+
data/
52+
models/
53+
logs/
54+
cache/
55+
results/
56+
outputs/
57+
*.gguf
58+
*.bin
59+
*.safetensors
60+
*.pt
61+
*.pth
62+
*.ckpt
63+
*.h5
64+
65+
# Documentation
66+
docs/
67+
papers/
68+
assets/
69+
*.pdf
70+
*.docx
71+
*.pptx
72+
73+
# Environment
74+
.env
75+
.env.*
76+
!.env.example
77+
78+
# Docker
79+
Dockerfile*
80+
docker-compose*.yml
81+
.dockerignore
82+
83+
# Temporary files
84+
*.tmp
85+
*.temp
86+
*.log
87+
*.bak
88+
*.backup
89+
*.old
90+
91+
# Archives
92+
*.zip
93+
*.tar
94+
*.tar.gz
95+
*.rar
96+
*.7z
97+
98+
# Media files (if not needed)
99+
*.mp4
100+
*.avi
101+
*.mov
102+
*.mp3
103+
*.wav
104+
105+
# Large test files
106+
test_data/
107+
sample_data/
108+
benchmark/
109+
110+
# CI/CD
111+
.travis.yml
112+
.gitlab-ci.yml
113+
azure-pipelines.yml
114+
115+
# Node (if any frontend exists)
116+
node_modules/
117+
npm-debug.log
118+
yarn-error.log
119+
120+
# OS files
121+
Thumbs.db
122+
Desktop.ini
123+
124+
# Secrets and credentials
125+
*.pem
126+
*.key
127+
*.crt
128+
*.p12
129+
credentials/
130+
secrets/

.env.example

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
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

Comments
 (0)