windows + dev environment building failure to launch the backend service #12623
Replies: 1 comment
-
|
The backend launch commands fail on Windows because they use Linux shell syntax and tools (like jemalloc, LD_PRELOAD, and bash scripting) that aren't supported in Windows PowerShell or Command Prompt. jemalloc is a Linux-specific library and isn't required or available on Windows, so those steps can't be run natively on Windows environments (source, source). There are no official Windows-native scripts or support for launching the backend service directly. The recommended way to run RAGFlow on Windows is to use Docker or Windows Subsystem for Linux (WSL2), which provide a Linux-like environment where all scripts and dependencies work as intended (source, source). With Docker, you can follow the standard instructions to start the server, and with WSL2, you can run the Linux shell scripts directly. For the onnxruntime DLL error, this is a common Windows issue and usually relates to missing or incompatible DLLs, or a mismatch between your Python version and the onnxruntime package. To resolve it, try reinstalling torch before onnxruntime, and ensure both onnxruntime and onnxruntime-gpu are upgraded to compatible versions (e.g., 1.18.0). Running onnxruntime on GPU is not recommended on Windows due to stability issues (source). There is no dedicated Windows setup or migration guide. If you need to run shell scripts or migrations, use WSL2 or a bash-compatible shell like Git Bash, but full native support is not available (source). In summary: use Docker or WSL2 for RAGFlow development on Windows, and address onnxruntime DLL errors by carefully managing your Python and dependency versions. Native Windows execution is not supported. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
OS: Windows
Issue: Failed for step 5 "Run the entrypoint.sh script to launch the backend service" as follows.
JEMALLOC_PATH=$(pkg-config --variable=libdir jemalloc)/libjemalloc.so;
LD_PRELOAD=$JEMALLOC_PATH python rag/svr/task_executor.py 1;
Error Details
JEMALLOC_PATH=$(pkg-config --variable=libdir jemalloc)/libjemalloc.so : The term 'JEMALLOC_PATH=$(pkg-config
--variable=libdir jemalloc)/libjemalloc.so' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.
At line:1 char:1
Error Details
from pkg_resources import parse_version
Traceback (most recent call last):
File "C:\Workspace\AILearning\ragflow\api\ragflow_server.py", line 33, in
from api.apps import app
File "C:\Workspace\AILearning\ragflow\api\apps_init_.py", line 33, in
from api.utils.api_utils import server_error_response
File "C:\Workspace\AILearning\ragflow\api\utils\api_utils.py", line 41, in
from api.db.services.tenant_llm_service import LLMFactoriesService
File "C:\Workspace\AILearning\ragflow\api\db\services\tenant_llm_service.py", line 27, in
from rag.llm import ChatModel, CvModel, EmbeddingModel, OcrModel, RerankModel, Seq2txtModel, TTSModel
File "C:\Workspace\AILearning\ragflow\rag\llm_init_.py", line 146, in
module = importlib.import_module(full_module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PaulHui\AppData\Local\Programs\Python\Python312\Lib\importlib_init_.py", line 90, in import_module
return bootstrap.gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Workspace\AILearning\ragflow\rag\llm\ocr_model.py", line 21, in
from deepdoc.parser.mineru_parser import MinerUParser
File "C:\Workspace\AILearning\ragflow\deepdoc\parser_init.py", line 23, in
from .pdf_parser import PlainParser
File "C:\Workspace\AILearning\ragflow\deepdoc\parser\pdf_parser.py", line 41, in
from deepdoc.vision import OCR, AscendLayoutRecognizer, LayoutRecognizer, Recognizer, TableStructureRecognizer
File "C:\Workspace\AILearning\ragflow\deepdoc\vision_init.py", line 22, in
from .ocr import OCR
File "C:\Workspace\AILearning\ragflow\deepdoc\vision\ocr.py", line 32, in
import onnxruntime as ort
File "C:\Workspace\AILearning\ragflow.venv\Lib\site-packages\onnxruntime_init_.py", line 74, in
raise import_capi_exception
File "C:\Workspace\AILearning\ragflow.venv\Lib\site-packages\onnxruntime_init_.py", line 24, in
from onnxruntime.capi._pybind_state import (
File "C:\Workspace\AILearning\ragflow.venv\Lib\site-packages\onnxruntime\capi_pybind_state.py", line 32, in
from .onnxruntime_pybind11_state import * # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: DLL load failed while importing onnxruntime_pybind11_state: A dynamic link library (DLL) initialization routine failed.
Question:
How to build the dev environment for Windows environment? It would be appreciated if there any guide for Windows.
Beta Was this translation helpful? Give feedback.
All reactions