From d120db025e9e60c540c6eb2cc6f94aa7c62fb19f Mon Sep 17 00:00:00 2001 From: Zhao Changmin <597714572@qq.com> Date: Mon, 25 Jul 2022 15:35:00 +0800 Subject: [PATCH] Mirgate Terminal Setup Steps into Developer Guide (#5133) * correct prepare_env.sh path * Alternative way to prepare envs --- .../source/doc/UserGuide/develop.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/readthedocs/source/doc/UserGuide/develop.md b/docs/readthedocs/source/doc/UserGuide/develop.md index 76bdeb0d..c2133b24 100644 --- a/docs/readthedocs/source/doc/UserGuide/develop.md +++ b/docs/readthedocs/source/doc/UserGuide/develop.md @@ -89,9 +89,40 @@ export PYTHONPATH=BigDL/python/dllib/src:BigDL/python/nano/src:BigDL/python/orca export PYTHONPATH=BigDL/python/dist/conf/spark-bigdl.conf:$PYTHONPATH ``` +- Install and add `tflibs` to `TF_LIBS_PATH`: +```bash +# Install bigdl-tf and bigdl-math +pip install bigdl-tf bigdl-math + +# Configure TF_LIBS_PATH +export TF_LIBS_PATH=$(python -c 'import site; print(site.getsitepackages()[0])')/bigdl/share/tflibs +``` + + The above environment variables should be available when running or debugging code in the IDE. When running applications in PyCharm, you can add runtime environment variables by clicking __Run__ -> __Edit Configurations__; then in the __Run/Debug Configurations__ panel, you can add necessary environment variables to your applications. +#### **1.3 Terminal Setup** + +Besides setting the environment variables mentioned above manually for Linux users, we also provide a solution to set them with a script: + +```bash +# Install bigdl-tf and bigdl-math +pip install bigdl-tf bigdl-math + +cd BigDL/python/friesian +source dev/prepare_env.sh +``` + +You can verify the BigDL environment by running the following example. + +```bash +python BigDL/python/dllib/examples/autograd/custom.py +``` + +Note that this approach will only work temporarily for this terminal. + + ### **2. Scala** #### **2.1 Build**