runs lgsim and autoware at the same time
1 parent cc16c89 commit 03ea3bab7db8891be15a5a6706879e1abccefd61
@Ryo Nakabayashi Ryo Nakabayashi authored on 5 Dec 2019
Showing 3 changed files
View
7
Dockerfile
# FROM ubuntu:16.04
FROM ubuntu:18.04
 
# FROM ubuntu:18.04
FROM autoware/autoware:1.13.0-melodic-cuda
 
# Make all NVIDIA GPUS visible, but I want to manually install drivers
ARG NVIDIA_VISIBLE_DEVICES=all
# Supress interactive menu while installing keyboard-configuration
RUN apt-get update && apt-get install -y --no-install-recommends \
alsa pulseaudio libgtk2.0-0 && \
rm -rf /var/lib/apt/lists/*
 
USER root
WORKDIR /
 
# novnc
# download websockify as well
RUN wget https://github.com/novnc/noVNC/archive/v1.1.0.zip && \
unzip -q v1.1.0.zip && \
View
10
run.sh
# [ ! -e /etc/X11/xorg.conf ] && nvidia-xconfig -a --virtual=$SCREEN_RESOLUTION --allow-empty-initial-configuration --enable-all-gpus --busid $BUSID
# nvidia-xconfig -a --virtual=800x600 --allow-empty-initial-configuration --enable-all-gpus --busid 0:4:0
BUS_ID=$(nvidia-xconfig --query-gpu-info | grep 'PCI BusID' | sed -r 's/\s*PCI BusID : PCI:(.*)/\1/')
echo $BUS_ID
nvidia-xconfig -a --virtual=1280x720 --allow-empty-initial-configuration --enable-all-gpus --busid $BUS_ID
sudo nvidia-xconfig -a --virtual=1280x720 --allow-empty-initial-configuration --enable-all-gpus --busid $BUS_ID
 
# 1. launch X server
Xorg :0 &
sudo Xorg :0 &
sleep 2 # wait for the server gets ready
 
# 2. start x11 and vnc connection
x11vnc -display :0 -passwd pass -forever -rfbport 5900 --verbose &
sudo x11vnc -display :0 -passwd pass -forever -rfbport 5900 --verbose &
sleep 2 # wait for the server gets ready
 
# 2.5 start audio
pulseaudio --start
sudo pulseaudio --start
sleep 2
 
# 3. start noVNC
/noVNC-1.1.0/utils/launch.sh --vnc localhost:5900 --listen 8081 &
sudo /noVNC-1.1.0/utils/launch.sh --vnc localhost:5900 --listen 8081 &
sleep 2
 
echo 'running noVNC at http://localhost:8081/vnc.html?host=localhost&port=8081'
 
View
server.sh