UnityRenderStreaming使用记录(四)

测试把UnityRenderStreaming部署在docker,剧透一下,嘎了……

在这里插入图片描述

当然webserver运行的妥妥的

在这里插入图片描述

那么打包出的程序运行log

在这里插入图片描述

Mono path[0] = '/home/unity/Broadcast/Broadcast_Data/Managed'
Mono config path = '/home/unity/Broadcast/Broadcast_Data/MonoBleedingEdge/etc'
Found 1 interfaces on host : 0) 172.17.0.2
Multi-casting "[IP] 172.17.0.2 [Port] 55000 [Flags] 2 [Guid] 1613740712 [EditorId] 4137315725 [Version] 1048832 [Id] L>
Starting managed debugger on port 56712
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,server=y,suspend=n,address=0.0.0.0:56712
Preloaded 'libwebrtc.so'
AS: AutoStreaming module initializing.
Unable to load player prefs
Desktop is 0 x 0 @ 0 Hz

dockerfile和start.sh

FROM ubuntu:24.04

USER root
LABEL maintainer="xuefei"

RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:123456' | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

# 创建用户和组
RUN groupadd -r xuefei && useradd -r -g xuefei -m -u 2000 xuefei

# 复制文件
COPY --chown=2000:xuefei ./unity /home/unity

# 设置权限
RUN chmod -R 755 /home/unity
EXPOSE 8080 80

# 切换到非root用户
USER 2000

# 设置工作目录
WORKDIR /home/unity

ENTRYPOINT ["/home/unity/start.sh"]

#!/bin/bash
export XDG_RUNTIME_DIR=/unity
./webserver -p 80 &
./Broadcast/Broadcast.x86_64 &
wait

一些参考链接

https://discussions.unity.com/t/render-streaming-app-crash-in-linux-container-headless/897617/9

https://askubuntu.com/questions/1072918/running-unity3d-game-on-linux-minimal

https://discussions.unity.com/t/webrtc-is-disconnected-in-the-linux-container/902496

https://wiki.archlinux.org/title/Unity3D

25.1.2这个很专业,但看不懂,明天继续……

https://zhuanlan.zhihu.com/p/521023922

25.1.3 测试上面的方案

https://zhuanlan.zhihu.com/p/521022054 这里我测试了方案2,嘎了

嘎在了这步 Xorg -dpi 96 -noreset -nolisten tcp +extension GLX +extension RANDR +extension RENDER +extension DOUBLE-BUFFER -logfile xorg-10.log -config xorg.conf -verbose :10 &
具体日志如下

root@456fabd3120b:~/unity# Xorg -dpi 96 -noreset -nolisten tcp +extension GLX +extension RANDR +extension RENDER +extension DOUBLE-BUFFER -logfile xorg-10.log -config xorg.conf -verbose :10 &
[5] 196
root@456fabd3120b:~/unity# 
X.Org X Server 1.21.1.11
X Protocol Version 11, Revision 0
Current Operating System: Linux 456fabd3120b 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.8.0-51-generic root=UUID=a1816ac1-e510-4971-8646-13cc6580d5a4 ro quiet splash vt.handoff=7
xorg-server 2:21.1.12-1ubuntu1.1 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.42.2
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "xorg-10.log", Time: Fri Jan  3 09:47:37 2025
(++) Using config file: "xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(==) ServerLayout "Layout0"
(**) |-->Screen "Screen0" (0)
(**) |   |-->Monitor "Monitor0"
(**) |   |-->Device "Device0"
(**) |-->Input Device "Keyboard0"
(**) |-->Input Device "Mouse0"
(**) Allowing byte-swapped clients
(==) Automatically adding devices
(==) Automatically enabling devices
(==) Automatically adding GPU devices
(==) Automatically binding GPU devices
(==) Max clients allowed: 256, resource mask: 0x1fffff
(WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
	Entry deleted from font path.
(==) FontPath set to:
	/usr/share/fonts/X11/misc,
	/usr/share/fonts/X11/Type1,
	built-ins
(==) ModulePath set to "/usr/lib/xorg/modules"
(WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
(WW) Disabling Keyboard0
(WW) Disabling Mouse0
(EE) systemd-logind: failed to get session: Launch helper exited with unknown return code 1
(II) xfree86: Adding drm device (/dev/dri/card1)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
(II) xfree86: Adding drm device (/dev/dri/card0)
(II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/simple-framebuffer.0/drm/card0
(--) PCI:*(1@0:0:0) 10de:1b81:1043:859d rev 161, Mem @ 0xa2000000/16777216, 0x90000000/268435456, 0xa0000000/33554432, I/O @ 0x00003000/128, BIOS @ 0x????????/131072
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
	compiled for 1.21.1.11, module version = 1.0.0
(WW) Warning, couldn't open module nvidia
(EE) Failed to load module "nvidia" (module does not exist, 0)
(==) Matched nouveau as autoconfigured driver 0
(==) Matched modesetting as autoconfigured driver 1
(==) Matched fbdev as autoconfigured driver 2
(==) Matched vesa as autoconfigured driver 3
(==) Assigned the driver to the xf86ConfigLayout
(II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so
(II) Module nouveau: vendor="X.Org Foundation"
	compiled for 1.21.1.3, module version = 1.0.17
(II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
(II) Module modesetting: vendor="X.Org Foundation"
	compiled for 1.21.1.11, module version = 1.21.1
(II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
(II) Module fbdev: vendor="X.Org Foundation"
	compiled for 1.21.1.11, module version = 0.5.0
(II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
(II) Module vesa: vendor="X.Org Foundation"
	compiled for 1.21.1.7, module version = 2.6.0
(II) NOUVEAU driver Date:   Sat Jan 23 12:24:42 2021 -0500
(II) NOUVEAU driver for NVIDIA chipset families :
	RIVA TNT            (NV04)
	RIVA TNT2           (NV05)
	GeForce 256         (NV10)
	GeForce 2           (NV11, NV15)
	GeForce 4MX         (NV17, NV18)
	GeForce 3           (NV20)
	GeForce 4Ti         (NV25, NV28)
	GeForce FX          (NV3x)
	GeForce 6           (NV4x)
	GeForce 7           (G7x)
	GeForce 8           (G8x)
	GeForce 9           (G9x)
	GeForce GTX 2xx/3xx (GT2xx)
	GeForce GTX 4xx/5xx (GFxxx)
	GeForce GTX 6xx/7xx (GKxxx)
	GeForce GTX 9xx     (GMxxx)
	GeForce GTX 10xx    (GPxxx)
(II) modesetting: Driver for Modesetting Kernel Drivers: kms
(II) FBDEV: driver for framebuffer: fbdev
(II) VESA: driver for VESA chipsets: vesa
xf86EnableIO: failed to enable I/O ports 0000-03ff (Operation not permitted)
(WW) Falling back to old probe method for modesetting
(EE) open /dev/dri/card0: No such file or directory
(WW) Falling back to old probe method for fbdev
(II) Loading /usr/lib/xorg/modules/libfbdevhw.so
(II) Module fbdevhw: vendor="X.Org Foundation"
	compiled for 1.21.1.11, module version = 0.0.2
(EE) open /dev/fb0: No such file or directory
(WW) Falling back to old probe method for modesetting
(EE) open /dev/dri/card0: No such file or directory
(WW) Falling back to old probe method for fbdev
(II) Loading /usr/lib/xorg/modules/libfbdevhw.so
(II) Module fbdevhw: vendor="X.Org Foundation"
	compiled for 1.21.1.11, module version = 0.0.2
(EE) open /dev/fb0: No such file or directory
(EE) No devices detected.
(EE) 
Fatal server error:
(EE) no screens found(EE) 
(EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "xorg-10.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

[5]   Exit 1                  Xorg -dpi 96 -noreset -nolisten tcp +extension GLX +extension RANDR +extension RENDER +extension DOUBLE-BUFFER -logfile xorg-10.log -config xorg.conf -verbose :10
root@456fabd3120b:~/unity# 

dockerfile如下

FROM nvidia/cuda:12.6.3-runtime-ubuntu24.04
RUN apt-get update && apt-get install -y openssh-server xorg nvidia-driver-560 nvidia-settings nvidia-prime
RUN mkdir /var/run/sshd
RUN echo 'root:123456' | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
EXPOSE 22
EXPOSE 80
CMD ["/usr/sbin/sshd", "-D"]
#COPY ./unity /unity
#RUN chmod -R 755 /unity
#WORKDIR /unity
#ENTRYPOINT ["/unity/start.sh"]

nvidia-smi

root@456fabd3120b:~/unity# nvidia-smi
Fri Jan  3 09:53:34 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.120                Driver Version: 560.35.05      CUDA Version: 12.6     |
|-----------------------------------------+------------------------+----------------------+
| 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 GeForce GTX 1070        Off |   00000000:01:00.0  On |                  N/A |
| 29%   42C    P8              9W /  151W |      81MiB /   8192MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
+-----------------------------------------------------------------------------------------+
root@456fabd3120b:~/unity#

docker相关操作

docker pull nvidia/cuda:12.6.3-runtime-ubuntu24.04
docker stop unity
docker remove unity
docker build -t unity:v25.1.3.1 .
docker run -d -p 2222:22 -p 8080:80 --name unity --gpus all unity:v25.1.3.1

未完待续……

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/947330.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

javaEE-文件操作和IO-文件

目录 一.什么是文件 1.文件就是硬盘(磁盘)上的文件。 2.计算机中存储数据的设备: 3.硬盘的物理特征 4.树型结构组织和⽬录 5.文件路径 文件路径有两种表示方式: 6.文件的分类 二、java中文件系统的操作 1.File类中的属性: 2.构造方…

SqlSession的线程安全问题源码分析

🎮 作者主页:点击 🎁 完整专栏和代码:点击 🏡 博客主页:点击 文章目录 SqlSession 是线程安全的吗?为什么说是线程不安全的?事务管理问题 数据库连接的共享问题 一级缓存线程安全问题…

拆解 Web3:探寻去中心化网络的核心密码

近年来,Web3频繁出现在技术讨论中,被视为互联网发展的下一阶段。那么,Web3究竟是什么?它如何区别于传统互联网,又将为未来的网络带来哪些新的可能?本文将从科普的角度拆解Web3的核心密码,揭开它…

《Vue3实战教程》37:Vue3生产部署

如果您有疑问,请观看视频教程《Vue3实战教程》 生产部署​ 开发环境 vs. 生产环境​ 在开发过程中,Vue 提供了许多功能来提升开发体验: 对常见错误和隐患的警告对组件 props / 自定义事件的校验响应性调试钩子开发工具集成 然而&#xff…

Ruby自动化:用Watir库获取YouTube视频链接

引言 Watir(Web Application Testing in Ruby)是一个强大的工具,它允许开发者使用Ruby语言来自动化控制浏览器。Watir最初被设计用于自动化Web应用测试,但其功能远不止于此。通过Watir,我们可以模拟用户行为&#xff…

[CTF/网络安全] 攻防世界 warmup 解题详析

查看页面源代码&#xff0c;发现source.php 得到一串代码&#xff0c;进行代码审计&#xff1a; <?phpclass emmm{public static function checkFile(&$page){$whitelist ["source">"source.php","hint">"hint.php"];…

solr9.7 单机安装教程

1.环境要求:jdk11以上 2.下载wget https://dlcdn.apache.org/solr/solr/9.7.0/solr-9.7.0.tgz 3.解压 4.修改solr.in.sh配置 5.启动命令 bin/solr start 6.创建core bin/solr create -c <core名称> 注意:用solr ui界面创建&#xff0c;会提示找不到solrconfig.xml和m…

应用架构模式-总体思路

采用引导式设计方法&#xff1a;以企业级架构为指导&#xff0c;形成较为齐全的规范指引。在实践中总结重要设计形成决策要点&#xff0c;一个决策要点对应一个设计模式。自底向上总结采用该设计模式的必备条件&#xff0c;将之转化通过简单需求分析就能得到的业务特点&#xf…

基于AI大模型的医院SOP优化:架构、实践与展望

一、引言 1.1 研究背景与意义 近年来,人工智能(AI)技术取得了迅猛发展,尤其是大模型的出现,为各个领域带来了革命性的变化。在医疗领域,AI 医疗大模型正逐渐崭露头角,展现出巨大的应用潜力。随着医疗数据的海量积累以及计算能力的大幅提升,AI 医疗大模型能够对复杂的…

AWS re:Invent 2024 - Dr. Werner Vogels 主题演讲

今年&#xff0c;我有幸亲临现场参加了所有的 keynote&#xff0c;每一场都让我感受到深深的震撼。无论是全新的功能发布&#xff0c;还是令人眼前一亮的新特性展示&#xff0c;每一场 keynote 都精彩纷呈&#xff0c;充满干货&#xff0c;值得反复学习和回味。 恰好&#xff…

UnionTech OS Server 20 网页无法访问yum源地址

统信yum地址 https://euler-packages.chinauos.com/server-euler/fuyu/1060/everything/sw_64/Packages/ 浏览器访问401报错无权限&#xff0c;查看linux uos环境下yum配置的用户名和密码 cat /etc/yum/vars/auth_* 然后自己组装生成Basic Authorization def generate_basic_…

自动化测试常考的面试题+答案汇总(持续更新)

Hi&#xff0c;大家好&#xff0c;。最近很多朋友都在说今年的互联网行情不好&#xff0c;面试很难&#xff0c;不知道怎么复习&#xff0c;我最近总结了一份在自动化测试面试中比较常见的面试题合集&#xff0c;希望对大家有帮助。 本文共 4800 字&#xff0c;预计阅读时间 1…

jvm结构介绍

JVM结构概述 Java虚拟机&#xff08;JVM&#xff09;是Java程序的运行环境&#xff0c;它负责将Java字节码转换为机器码并执行。JVM的结构主要包括类加载子系统、运行时数据区、执行引擎、本地接口以及垃圾收集器。 1. 类加载子系统&#xff08;Class Loader Subsystem&#xf…

ruoyi开发学习

将若依框架中的若依元素删掉 1.删除主目录中的“若依官网”&#xff1a; 在后端项目中&#xff0c;idea里借助mysql管理工具&#xff0c;找到sys_menu数据表&#xff0c;双击打开&#xff0c;找到4 若依官网&#xff0c;选中点击减号&#xff0c;绿色上箭头刷新&#xff0c;删…

计算机网络 (13)信道复用技术

前言 计算机网络中的信道复用技术是一种提高网络资源利用率的关键技术。它允许在一条物理信道上同时传输多个用户的信号&#xff0c;从而提高了信道的传输效率和带宽利用率。 一、信道复用技术的定义 信道复用&#xff08;Multiplexing&#xff09;就是在一条传输媒体上同时传输…

您的公司需要小型语言模型

当专用模型超越通用模型时 “越大越好”——这个原则在人工智能领域根深蒂固。每个月都有更大的模型诞生&#xff0c;参数越来越多。各家公司甚至为此建设价值100亿美元的AI数据中心。但这是唯一的方向吗&#xff1f; 在NeurIPS 2024大会上&#xff0c;OpenAI联合创始人伊利亚…

艾体宝产品丨加速开发:Redis 首款 VS Code 扩展上线!

Redis 宣布推出其首款专为 VS Code 设计的 Redis 扩展。这一扩展将 Redis 功能直接整合进您的集成开发环境&#xff08;IDE&#xff09;&#xff0c;旨在简化您的工作流程&#xff0c;提升工作效率。 我们一直致力于构建强大的开发者生态系统&#xff0c;并在您工作的每一步提…

数据挖掘——关联规则挖掘

数据挖掘——关联数据挖掘 关联数据挖掘关联规则关联规则挖掘问题&#xff1a;具体挖掘过程Apriori 产生关联规则 关联数据挖掘 关联分析用于发现隐藏在大型数据集中的令人感兴趣的联系&#xff0c;所发现的模式通常用关联规则或频繁项集的形式表示。 关联规则反映一个事物与…

12.30-1-5学习周报

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 文章链接摘要Abstract一、方法介绍1.HAT-CIR2.Horde3.DWGRNet 二、实验总结 文章链接 https://arxiv.org/pdf/2405.04101 摘要 本博客介绍了论文《Continual lea…

Synopsys软件基本使用方法

Synopsys软件基本使用方法 1 文件说明2 编译流程3 查看波形4 联合仿真 本文主要介绍Synopsys软件vcs、verdi的基本使用方法&#xff0c;相关文件可从 GitHub下载。 1 文件说明 创建verilog源文件add.v、mult.v、top.vmodule add (input signed [31:0] dina,input signed [3…