Skip to content

Commit 12f19ac

Browse files
authored
docs: document needed setup for macos (jina-ai#5489)
1 parent ac5059f commit 12f19ac

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

docs/fundamentals/flow/remarks.md

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ Few cases require to use `spawn` start method for multiprocessing.
132132
Inline functions, such as nested or lambda functions are not picklable. Use `functools.partial` instead.
133133
134134
135+
(flow-macos-multi-processing-fork)=
135136
## Multiprocessing Fork in MacOS
136137
137138
Apple has changed the rules for using Objective-C between `fork()` and `exec()` since macOS 10.13.

docs/get-started/install/troubleshooting.md

+14
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ Then you are likely installing Jina on a less-supported system/architecture. For
3535

3636
Unfortunately, `conda install` is not supported on Windows. You can either do `pip install jina` natively on Windows, or use `pip/conda install` under WSL2.
3737

38+
## On MacOS >= 10.13
39+
{ref}`Multiprocessing with fork in MacOS <flow-macos-multi-processing-fork>` requires setting the environment variable
40+
`OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES` for versions higher than 10.13.
41+
You can set this variable each time you run a python interpreter that uses Jina or configure it by default using the
42+
following command:
43+
```shell
44+
echo "export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES" >> ~/.zshrc
45+
```
46+
47+
````{admonition} Caution
48+
:class: caution
49+
Be aware that the latter method will apply to all tools that use the underlying Objective-C fork method.
50+
````
51+
3852
## Upgrading from Jina 2.x to 3.x
3953
If you upgraded an existing Jina installation from 2.x to 3.x you may see the following error message:
4054

0 commit comments

Comments
 (0)