参考:https://www.xiexianbin.cn/linux/vnc/turbovnc/index.html
一、安装TurboVNC
apt update && apt install -y libglu1-mesa-dev mesa-utils xterm xauth x11-xkb-utils xfonts-base xkb-data libxtst6 libxv1
# 安装libjpeg-turbo和turbovnc
export TURBOVNC_VERSION=2.2.5
export LIBJPEG_VERSION=2.0.90
wget http://aivc.ks3-cn-beijing.ksyun.com/packages/libjpeg-turbo/libjpeg-turbo-official_${LIBJPEG_VERSION}_amd64.deb
wget http://aivc.ks3-cn-beijing.ksyun.com/packages/turbovnc/turbovnc_${TURBOVNC_VERSION}_amd64.deb
dpkg -i libjpeg-turbo-official_${LIBJPEG_VERSION}_amd64.deb
dpkg -i turbovnc_${TURBOVNC_VERSION}_amd64.deb
rm -rf *.deb
# 启动VNC服务端,这一步可能涉及vnc密码配置(注意不是实例的账户密码)。另外如果出现报错xauth未找到,那么使用apt install xauth再安装一次
USER=root /opt/TurboVNC/bin/vncserver :1 -desktop X -auth /root/.Xauthority -geometry 1920x1080 -depth 24 -rfbwait 120000 -rfbauth /root/.vnc/passwd -fp /usr/share/fonts/X11/misc/,/usr/share/fonts -rfbport 6006
USER=carla /opt/TurboVNC/bin/vncserver :1 -desktop X -auth /home/carla/.Xauthority -geometry 1920x1080 -depth 24 -rfbwait 120000 -rfbauth /home/carla/.vnc/passwd -fp /usr/share/fonts/X11/misc/,/usr/share/fonts -rfbport 6006
# 启动您想启动且已经安装成功的GUI程序,例如glxgears、firefox等
firefox
# 添加DISPLAY环境变量
export DISPLAY=:1
# 查看当前开启的VNC服务
/opt/TurboVNC/bin/vncserver -list
# 关闭VNC服务
/opt/TurboVNC/bin/vncserver -kill :id
二、配置Carla
-
配置conda环境
安装miniconda: https://blog.csdn.net/qq_44907926/article/details/125027129
conda create -n carla_env python=3.7 pip3 install --upgrade pip && pip3 install pygame numpy && pip install pygame numpy
-
解压文件
tar -zxvf
-
用户相关
配置cuda和miniconda: https://blog.csdn.net/lavinia_chen007/article/details/125386015
新建用户赋予root权限:https://blog.csdn.net/mengfanfan1/article/details/123921435
-
注意事项:
./CarlaUE4.sh
不能用root用户启动,可以新建用户给root权限,然后把root目录加上rx权限vulkan安装:https://blog.csdn.net/luolinll1212/article/details/113261022
-
用VirtualGL+Turbovnc来实现远程显示
vglrun -d :1 ****
安装方法参考autodl的远程桌面安装
VirtualGL的网址:https://sourceforge.net/projects/virtualgl/files/3.0.2/
配置:https://blog.csdn.net/weixin_44831881/article/details/119810165