Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update webserver to comply with websockets 14.1 version #171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PMohanJ
Copy link
Member

@PMohanJ PMohanJ commented Dec 22, 2024

Reference the issue numbers and reviewers
#170 @ehfd

Explain relevant issues and how this pull request solves them
Due to latest version release of websockets to 14.1 the current implementation requires refactoring to comply with the latest release

Describe the changes in code and its dependencies and justify that they work as intended after testing
Created custom_response function to allow the response to accept bytes type to have backword compatibility to server web pages via python server, of which is being handled by Nginx server now.

Describe alternatives you've considered
NA

Additional context
NA

  • I confirm that this pull request is relevant to the scope of this project. If you know that upstream projects are the cause of this problem, please file the pull request there.
  • I confirm that this pull request has been tested thoroughly and to the best of my knowledge that additional unintended problems do not arise.
  • I confirm that the style of the changed code conforms to the overall style of the project.
  • I confirm that I have read other open and closed pull requests and that duplicates do not exist.
  • I confirm that I have justified the need for this pull request and that the changes reflect the fix for the specified problem.
  • I confirm that no portion of this pull request contains credentials or other private information, and it is my own responsibility to protect my privacy.
  • I confirm that the authors of this pull request does not willfully breach or infringe legal regulations, in any and all global law, regarding trademarks, trade names, logos, patents, or any and all other forms of external intellectual property, as well as adhering to software license terms of open-source and proprietary software projects.

Created custom_response function to allow the response to accept bytes type
to have backword compatibility to server web pages via python server, of which
is being handled by Nginx server now.
Supperssing the ERROR logs by moving the loglevel to CRITIAL due to initial
handshake error. But the log level can be changed with env SELKIES_WEBSOCKETS_LOG_LEVEL.

Signed-off-by: PMohanJ <[email protected]>
@alexeadem
Copy link

alexeadem commented Feb 2, 2025

@ehfd I confirm this PR works with deb12 and websockets 14.2 in QBO

See script to compile for Debian 12:

https://github.com/alexeadem/selkies-gstreamer/tree/pr-171-deb12

 docker exec -it d5f886970e4c bash
root@d5f886970e4c:~# 
root@d5f886970e4c:~# pip list | grep -E 'selkies-gstreamer|websockets|asyncio'
WARNING: The directory '/home/qbo/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
selkies-gstreamer  1.6.2+33.g4820b7a
websockets         14.2

nvidia-smi 
Sun Feb  2 09:49:33 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.77                 Driver Version: 565.77         CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA RTX A500 Laptop GPU     Off |   00000000:03:00.0 Off |                  N/A |
| N/A   49C    P8              6W /   30W |      11MiB /   4096MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      3596      G   /usr/bin/gnome-shell                            1MiB |
+-----------------------------------------------------------------------------------------+

Why Debian 12 instead of Ubuntu? Cause Kind images are maintained by the https://github.com/kubernetes-sigs/kind team and use systemd rather than supervisord

@ehfd
Copy link
Member

ehfd commented Feb 2, 2025

Thanks for the information. Please have patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants