You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Important Note: You only need to compile a custom Python backend stub if the
568
+
Python version is different from Python 3.8 which is shipped by
569
+
default in the Triton containers.**
565
570
566
571
Python backend uses a *stub* process to connect your `model.py` file to the
567
572
Triton C++ core. This stub process has an embedded Python interpreter with
@@ -570,19 +575,19 @@ different version from the default Python backend stub, you need to compile your
570
575
Python backend stub by following the steps below:
571
576
572
577
1. Install the software packages below:
573
-
*[conda](https://docs.conda.io/en/latest/)
574
578
*[cmake](https://cmake.org)
575
579
* rapidjson and libarchive (instructions for installing these packages in Ubuntu or Debian are included in [Building from Source Section](#building-from-source))
576
580
581
+
2. Make sure that the expected Python version is available in your environment.
577
582
578
-
2. Create and activate a [conda](https://docs.conda.io/en/latest/) environment with your desired Python version. In this example, we will be using Python 3.6:
579
-
```bash
580
-
conda create -n python-3-6 python=3.6
581
-
conda activate python-3-6
583
+
If you are using `conda`, you should make sure to activate the environment by
584
+
`conda activate <conda-env-name>`. Note that you don't have to use `conda` and
585
+
can install Python however you wish. Python backend relies on
586
+
[pybind11](https://github.com/pybind/pybind11) to find the correct Python
587
+
version. If you noticed that the correct Python version is not picked up, you
588
+
can read more on how
589
+
[pybind11 decides which Python to use](https://pybind11.readthedocs.io/en/stable/faq.html?highlight=cmake#cmake-doesn-t-detect-the-right-python-version).
582
590
583
-
# NumPy is required for Python models
584
-
conda install numpy
585
-
```
586
591
3. Clone the Python backend repository and compile the Python backend stub
587
592
(replace \<GIT\_BRANCH\_NAME\> with the branch name that you want to use,
0 commit comments