fariasultana commited on
Commit
03f8f96
·
verified ·
1 Parent(s): 5a3c5d8

docs: Add Docker build instructions

Browse files
Files changed (1) hide show
  1. docker/BUILD_INSTRUCTIONS.md +119 -0
docker/BUILD_INSTRUCTIONS.md ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MiniMind Max2 - Docker Build Instructions
2
+
3
+ ## Quick Start with Docker Buildx Cloud
4
+
5
+ ### 1. Create Cloud Builder
6
+ ```bash
7
+ docker buildx create --driver cloud sultanafariabd/minimind
8
+ ```
9
+
10
+ ### 2. Build with Cloud Builder
11
+ ```bash
12
+ # Clone the model files first
13
+ git clone https://huggingface.co/fariasultana/MiniMind
14
+ cd MiniMind/docker
15
+
16
+ # Build using cloud builder
17
+ docker buildx build --builder cloud-sultanafariabd-minimind \
18
+ --platform linux/amd64,linux/arm64 \
19
+ -t sultanafariabd/minimind-max2:latest \
20
+ -t sultanafariabd/minimind-max2:v1.0.0 \
21
+ -t sultanafariabd/minimind-max2:nano \
22
+ --push .
23
+ ```
24
+
25
+ ## Alternative: Standard Docker Build
26
+
27
+ ### 1. Login to Docker Hub
28
+ ```bash
29
+ docker login -u sultanafariabd
30
+ # Enter token: dckr_pat_WG_3IV0n-CxJhvAdGB79KHJtJbA
31
+ ```
32
+
33
+ ### 2. Build Image
34
+ ```bash
35
+ cd MiniMind/docker
36
+ docker build -t sultanafariabd/minimind-max2:latest .
37
+ ```
38
+
39
+ ### 3. Push to Docker Hub
40
+ ```bash
41
+ docker push sultanafariabd/minimind-max2:latest
42
+ docker tag sultanafariabd/minimind-max2:latest sultanafariabd/minimind-max2:v1.0.0
43
+ docker push sultanafariabd/minimind-max2:v1.0.0
44
+ ```
45
+
46
+ ## Run the Container
47
+
48
+ ```bash
49
+ # Run with default settings
50
+ docker run -p 8000:8000 sultanafariabd/minimind-max2:latest
51
+
52
+ # Run with custom variant
53
+ docker run -p 8000:8000 -e MODEL_VARIANT=max2-lite sultanafariabd/minimind-max2:latest
54
+
55
+ # Run with GPU support
56
+ docker run --gpus all -p 8000:8000 sultanafariabd/minimind-max2:latest
57
+ ```
58
+
59
+ ## API Endpoints
60
+
61
+ Once running, access the API at `http://localhost:8000`:
62
+
63
+ | Endpoint | Method | Description |
64
+ |----------|--------|-------------|
65
+ | `/` | GET | Root info |
66
+ | `/health` | GET | Health check |
67
+ | `/info` | GET | Model information |
68
+ | `/docs` | GET | Swagger UI |
69
+ | `/generate` | POST | Generate text with thinking |
70
+ | `/tools/call` | POST | Function calling |
71
+ | `/capabilities` | GET | List capabilities |
72
+
73
+ ## Example API Call
74
+
75
+ ```bash
76
+ curl -X POST http://localhost:8000/generate \
77
+ -H "Content-Type: application/json" \
78
+ -d '{
79
+ "prompt": "Explain quantum computing",
80
+ "max_tokens": 200,
81
+ "thinking_mode": "interleaved",
82
+ "show_thinking": true
83
+ }'
84
+ ```
85
+
86
+ ## Multi-Architecture Build
87
+
88
+ For ARM64 (Apple Silicon, Raspberry Pi) support:
89
+
90
+ ```bash
91
+ docker buildx build --platform linux/amd64,linux/arm64 \
92
+ -t sultanafariabd/minimind-max2:latest \
93
+ --push .
94
+ ```
95
+
96
+ ## Docker Compose
97
+
98
+ ```yaml
99
+ version: '3.8'
100
+ services:
101
+ minimind:
102
+ image: sultanafariabd/minimind-max2:latest
103
+ ports:
104
+ - "8000:8000"
105
+ environment:
106
+ - MODEL_VARIANT=max2-nano
107
+ - PORT=8000
108
+ healthcheck:
109
+ test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
110
+ interval: 30s
111
+ timeout: 10s
112
+ retries: 3
113
+ ```
114
+
115
+ ## Links
116
+
117
+ - **Docker Hub**: https://hub.docker.com/r/sultanafariabd/minimind-max2
118
+ - **HuggingFace Model**: https://huggingface.co/fariasultana/MiniMind
119
+ - **HuggingFace Space**: https://huggingface.co/spaces/fariasultana/MiniMind-API