[Bug]: Docker Installation problem
Is there an existing issue for the same bug?
- [X] I have checked the existing issues.
Branch name
main
Commit ID
...
Other environment information
Docker version 24.0.5
vm.max_map_count = 262144
WSL
Actual behavior
When I execute: docker logs -f ragflow-server
I get
stan@PLWA1189NA:~/ragflow/ragflow/docker$ docker logs -f ragflow-server
[HUQIE]:Build default trie
[HUQIE]:Build default trie
[HUQIE]:Build trie /ragflow/rag/res/huqie.txt
[HUQIE]:Build trie /ragflow/rag/res/huqie.txt
[HUQIE]:Build default trie
[HUQIE]:Build trie /ragflow/rag/res/huqie.txt
[WARNING] [2024-04-11 20:50:02,717] [synonym.__init__] [line:24]: Realtime synonym is disabled, since no redis connection.
[WARNING] [2024-04-11 20:50:02,786] [synonym.__init__] [line:24]: Realtime synonym is disabled, since no redis connection.
[WARNING] [2024-04-11 20:50:03,021] [synonym.__init__] [line:24]: Realtime synonym is disabled, since no redis connection.
[WARNING] Load term.freq FAIL!
Traceback (most recent call last):
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/transformers/utils/hub.py", line 398, in cached_file
resolved_file = hf_hub_download(
^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 110, in _inner_fn
validate_repo_id(arg_value)
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 158, in validate_repo_id
raise HFValidationError(
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/ragflow/rag/res/bge-large-zh-v1.5'. Use `repo_type` argument if needed.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/ragflow/rag/llm/embedding_model.py", line 30, in <module>
flag_model = FlagModel(os.path.join(
^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/FlagEmbedding/flag_models.py", line 19, in __init__
self.tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/transformers/models/auto/tokenization_auto.py", line 767, in from_pretrained
tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/transformers/models/auto/tokenization_auto.py", line 600, in get_tokenizer_config
resolved_config_file = cached_file(
^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/transformers/utils/hub.py", line 462, in cached_file
raise EnvironmentError(
OSError: Incorrect path_or_model_id: '/ragflow/rag/res/bge-large-zh-v1.5'. Please provide either the path to a local folder or the repo_id of a model on the Hub.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn
conn.connect()
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connection.py", line 653, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connection.py", line 806, in _ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/util/ssl_.py", line 465, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/util/ssl_.py", line 509, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/ssl.py", line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/ssl.py", line 1075, in _create
self.do_handshake()
File "/root/miniconda3/envs/py11/lib/python3.11/ssl.py", line 1346, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:992)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 793, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 491, in _make_request
raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:992)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 847, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='hf-mirror.com', port=443): Max retries exceeded with url: /BAAI/bge-large-zh-v1.5/resolve/main/tokenizer_config.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:992)')))
Expected behavior
No response
Steps to reproduce
Above
Additional information
No response
+1
I have something like this. I can get all components of the docker to return healthy, I have vm.max_map_count = 262144. But it returns 404 in the browser.
I have something like this. I can get all components of the docker to return healthy, I have vm.max_map_count = 262144. But it returns 404 in the browser.
@cornpo for it to return you a working containers did you had to preconfigure them in specific way?
No, I didn't change the .env
My first problem was the "container unhealthy" problem due to wrong docker-compose version. I upgraded to requirements. Then "docker-compose up -d." Checked docker log and they all said healthy. But it would 404 in the browser for the page even though Werkzeug was serving.
No, I didn't change the .env
My first problem was the "container unhealthy" problem due to wrong docker-compose version. I upgraded to requirements. Then "docker-compose up -d." Checked docker log and they all said healthy. But it would 404 in the browser for the page even though Werkzeug was serving.
Remove the port you enter in browser.
Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
Branch name
main
Commit ID
...
Other environment information
Docker version 24.0.5 vm.max_map_count = 262144 WSLActual behavior
When I execute:
docker logs -f ragflow-serverI get
stan@PLWA1189NA:~/ragflow/ragflow/docker$ docker logs -f ragflow-server [HUQIE]:Build default trie [HUQIE]:Build default trie [HUQIE]:Build trie /ragflow/rag/res/huqie.txt [HUQIE]:Build trie /ragflow/rag/res/huqie.txt [HUQIE]:Build default trie [HUQIE]:Build trie /ragflow/rag/res/huqie.txt [WARNING] [2024-04-11 20:50:02,717] [synonym.__init__] [line:24]: Realtime synonym is disabled, since no redis connection. [WARNING] [2024-04-11 20:50:02,786] [synonym.__init__] [line:24]: Realtime synonym is disabled, since no redis connection. [WARNING] [2024-04-11 20:50:03,021] [synonym.__init__] [line:24]: Realtime synonym is disabled, since no redis connection. [WARNING] Load term.freq FAIL! Traceback (most recent call last): File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/transformers/utils/hub.py", line 398, in cached_file resolved_file = hf_hub_download( ^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 110, in _inner_fn validate_repo_id(arg_value) File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 158, in validate_repo_id raise HFValidationError( huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/ragflow/rag/res/bge-large-zh-v1.5'. Use `repo_type` argument if needed. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/ragflow/rag/llm/embedding_model.py", line 30, in <module> flag_model = FlagModel(os.path.join( ^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/FlagEmbedding/flag_models.py", line 19, in __init__ self.tokenizer = AutoTokenizer.from_pretrained(model_name_or_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/transformers/models/auto/tokenization_auto.py", line 767, in from_pretrained tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/transformers/models/auto/tokenization_auto.py", line 600, in get_tokenizer_config resolved_config_file = cached_file( ^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/transformers/utils/hub.py", line 462, in cached_file raise EnvironmentError( OSError: Incorrect path_or_model_id: '/ragflow/rag/res/bge-large-zh-v1.5'. Please provide either the path to a local folder or the repo_id of a model on the Hub. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn conn.connect() File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connection.py", line 653, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connection.py", line 806, in _ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( ^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/util/ssl_.py", line 465, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/util/ssl_.py", line 509, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/ssl.py", line 517, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/ssl.py", line 1075, in _create self.do_handshake() File "/root/miniconda3/envs/py11/lib/python3.11/ssl.py", line 1346, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:992) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 793, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 491, in _make_request raise new_e urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:992) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 847, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/py11/lib/python3.11/site-packages/urllib3/util/retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='hf-mirror.com', port=443): Max retries exceeded with url: /BAAI/bge-large-zh-v1.5/resolve/main/tokenizer_config.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:992)')))Expected behavior
No response
Steps to reproduce
AboveAdditional information
No response
If you do not have the internet connection, or are unable to ping hf-mirror.com, I suggest you manually download the resource from InfiniFlow/deepdoc into local folder, say, ~/deepdoc. Then, change the docker-compose.yml, add a volumes, like - ~/deepdoc:/ragflow/rag/res/deepdoc
@KevinHuSh Can you please provide an example of such changes? Why does the installation depend on the hf-mirror?
去这里手动下载 https://huggingface.co/InfiniFlow/deepdoc/tree/main
Ok I found the solution. Go to the docker-compose.yml file. There you will find this code
environment:
- TZ=${TIMEZONE}
- HF_ENDPOINT=https://huggingface.com
You need to change it to this ->
environment:
- TZ=${TIMEZONE}
- HF_ENDPOINT=https://hf-mirror.com