Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Conversation

@xuechendi
Copy link
Contributor

  1. add auto dependencies installation
  2. add local path for loading 'sentence-transformers' model
  3. authentication update
    TODO: If it makes sense, we can add configuration for User to decide private key path

@carsonwang
Copy link
Contributor

cc @KepingYan

self.ssh_connect[index].load_system_host_keys()
self.ssh_connect[index].set_missing_host_key_policy(paramiko.RejectPolicy())
#self.ssh_connect[index].load_system_host_keys()
self.ssh_connect[index].set_missing_host_key_policy(paramiko.AutoAddPolicy())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't use AutoAddPolicy because of code scan issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KepingYan , I see, thanks for the clarification, I'll make the change


def _init_ui(self):
mark_alive = None
private_key = paramiko.Ed25519Key.from_private_key_file("/root/.ssh/id_ed25519")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use a custom path to set private key? self.ssh_connect[index].load_system_host_keys() can load the content of '~/.ssh/known_hosts' by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, the id_rsa decoder is reporting error from my env, I found similiar report on google.
Using a path provides flexibility for user to decide if they want to use ED25519 or RSA. I believe in some "very Healthy" system, self.ssh_connect[index].load_system_host_keys() may also works, but not in my system...
So if you can provides this automatic option + a user defined path, it will greatly prevent user hard code to make web_ui working.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I see. I'm not sure about the format of your known_hosts, could you verify this method in your env?
For example, the node ip is 10.1.0.133, then run ssh-keyscan 10.1.0.133 >> ~/.ssh/known_hosts. And then modify 10.1.0.133 to [10.1.0.133]:22 like this:
image
If this doesn't work, it really needs a fallback method.

Comment on lines +101 to +103
lib_list = ["httpcore", "httpx", "paramiko", "urllib3", "markdown_it", "matplotlib"]
for lib in lib_list:
logging.getLogger(lib).setLevel(logging.ERROR)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is to solve the DEBUG log problem, I think it can be solved after #101 is merged.

else:
raise ValueError(f"{package_or_list} with type of {type(package_or_list)} is not supported.")

check_availability_and_install(['gradio==3.36.1', 'gradio_client==0.7.3', 'langchain==0.1.4', 'langchain-community==0.0.16', 'lz4', 'sentence-transformers==2.2.2', 'pyrecdp'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a script in #101 to install the UI environment, maybe we don't need to check it in code anymore. And we have to use pip install 'git+https://github.com/intel/e2eAIOK.git#egg=pyrecdp&subdirectory=RecDP' to install pyrecdp, pip install pyrecdp does not contain the latest code and will change the ray version.

Collecting ray==2.7.1 (from pyrecdp)
  Using cached ray-2.7.1-cp39-cp39-manylinux2014_x86_64.whl.metadata (13 kB)

@xuechendi
Copy link
Contributor Author

Hi, @KepingYan and @carsonwang , I don't meant to propose a merge in the PR.
The modification I made in the PR are something I used to fix the codes so it can run in my local ENV.
I believe others may encouter same issue as I did, so I want to use this PR to have some codes discussion .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants