Skip to content

Commit 743095b

Browse files
authored
docs(mac): improve documentation for mac build (#1873)
* docs(mac): Improve documentation for mac build - added documentation to build from current master - added troubleshooting information Signed-off-by: Sebastian <[email protected]> * docs(max): fix typo Signed-off-by: Sebastian <[email protected]> --------- Signed-off-by: Sebastian <[email protected]>
1 parent 3cf64d1 commit 743095b

File tree

1 file changed

+21
-6
lines changed
  • docs/content/docs/getting-started

1 file changed

+21
-6
lines changed

docs/content/docs/getting-started/build.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ To install the dependencies follow the instructions below:
4545
{{< tabs tabTotal="3" >}}
4646
{{% tab tabName="Apple" %}}
4747

48+
Install `xcode` from the App Store
49+
4850
```bash
4951
brew install abseil cmake go grpc protobuf wget
5052
```
@@ -111,10 +113,12 @@ docker run --rm -ti -p 8080:8080 -e DEBUG=true -e MODELS_PATH=/models -e THREADS
111113

112114
### Example: Build on mac
113115

114-
Building on Mac (M1 or M2) works, but you may need to install some prerequisites using `brew`.
116+
Building on Mac (M1, M2 or M3) works, but you may need to install some prerequisites using `brew`.
115117

116118
The below has been tested by one mac user and found to work. Note that this doesn't use Docker to run the server:
117119

120+
Install `xcode` from the Apps Store (needed for metalkit)
121+
118122
```
119123
# install build dependencies
120124
brew install abseil cmake go grpc protobuf wget
@@ -146,8 +150,20 @@ curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/jso
146150
}'
147151
```
148152

149-
### Build with Image generation support
153+
#### Troublshooting mac
154+
155+
If you encounter errors regarding a missing utility metal, install `Xcode` from the App Store.
156+
If completions are slow, ensure that `gpu-layers` in your model yaml matches the number of layers from the model in use (or simply use a high number such as 256).
157+
If you a get a compile error: `error: only virtual member functions can be marked 'final'`, reinstall all the necessary brew packages, clean the build, and try again.
158+
159+
```
160+
# reinstall build dependencies
161+
brew reinstall abseil cmake go grpc protobuf wget
162+
163+
make clean
150164
165+
make build
166+
```
151167

152168
**Requirements**: OpenCV, Gomp
153169

@@ -239,13 +255,12 @@ make BUILD_TYPE=sycl_f32 build # for float32
239255
#### Metal (Apple Silicon)
240256

241257
```
242-
make BUILD_TYPE=metal build
258+
make build
243259
244-
# Set `gpu_layers: 1` to your YAML model config file and `f16: true`
245-
# Note: only models quantized with q4_0 are supported!
260+
# correct build type is automatically used on mac (BUILD_TYPE=metal)
261+
# Set `gpu_layers: 256` (or equal to the number of model layers) to your YAML model config file and `f16: true`
246262
```
247263

248-
249264
### Windows compatibility
250265

251266
Make sure to give enough resources to the running container. See https://github.com/go-skynet/LocalAI/issues/2

0 commit comments

Comments
 (0)