|
@@ -1,36 +1,44 @@
|
|
|
-FROM nvidia/opengl:1.2-glvnd-runtime-ubuntu20.04
|
|
|
|
|
-# Comment the line above and uncomment the line below for Ubuntu 18.04
|
|
|
|
|
-#FROM nvidia/opengl:1.2-glvnd-runtime-ubuntu18.04
|
|
|
|
|
|
|
+# Ubuntu release versions 18.04 and 20.04 are supported
|
|
|
|
|
+ARG UBUNTU_RELEASE=20.04
|
|
|
|
|
+FROM nvcr.io/nvidia/cudagl:11.0.3-runtime-ubuntu${UBUNTU_RELEASE}
|
|
|
|
|
|
|
|
-LABEL maintainer "https://github.com/ehfd"
|
|
|
|
|
|
|
+LABEL maintainer "https://github.com/ehfd,https://github.com/danisla"
|
|
|
|
|
|
|
|
|
|
+ARG UBUNTU_RELEASE
|
|
|
# Make all NVIDIA GPUs visible, but we want to manually install drivers
|
|
# Make all NVIDIA GPUs visible, but we want to manually install drivers
|
|
|
ARG NVIDIA_VISIBLE_DEVICES=all
|
|
ARG NVIDIA_VISIBLE_DEVICES=all
|
|
|
# Supress interactive menu while installing keyboard-configuration
|
|
# Supress interactive menu while installing keyboard-configuration
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
ENV NVIDIA_DRIVER_CAPABILITIES all
|
|
ENV NVIDIA_DRIVER_CAPABILITIES all
|
|
|
|
|
+ENV PULSE_SERVER 127.0.0.1:4713
|
|
|
|
|
|
|
|
-# Default options (password is "mypasswd")
|
|
|
|
|
|
|
+# Default environment variables (password is "mypasswd")
|
|
|
ENV TZ UTC
|
|
ENV TZ UTC
|
|
|
-ENV PASSWD mypasswd
|
|
|
|
|
ENV SIZEW 1920
|
|
ENV SIZEW 1920
|
|
|
ENV SIZEH 1080
|
|
ENV SIZEH 1080
|
|
|
|
|
+ENV REFRESH 60
|
|
|
|
|
+ENV DPI 96
|
|
|
ENV CDEPTH 24
|
|
ENV CDEPTH 24
|
|
|
ENV VIDEO_PORT DFP
|
|
ENV VIDEO_PORT DFP
|
|
|
|
|
+ENV PASSWD mypasswd
|
|
|
|
|
+ENV NOVNC_ENABLE false
|
|
|
|
|
+ENV WEBRTC_ENCODER nvh264enc
|
|
|
|
|
+ENV WEBRTC_ENABLE_RESIZE false
|
|
|
|
|
+ENV ENABLE_AUDIO true
|
|
|
|
|
+ENV ENABLE_BASIC_AUTH true
|
|
|
|
|
|
|
|
# Install locales to prevent errors
|
|
# Install locales to prevent errors
|
|
|
RUN apt-get clean && \
|
|
RUN apt-get clean && \
|
|
|
- apt-get update && \
|
|
|
|
|
- apt-get install -y --no-install-recommends locales && \
|
|
|
|
|
|
|
+ apt-get update && apt-get install --no-install-recommends -y locales && \
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
locale-gen en_US.UTF-8
|
|
locale-gen en_US.UTF-8
|
|
|
ENV LANG en_US.UTF-8
|
|
ENV LANG en_US.UTF-8
|
|
|
ENV LANGUAGE en_US:en
|
|
ENV LANGUAGE en_US:en
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
|
|
|
|
-# Install Xorg, MATE desktop, and others
|
|
|
|
|
|
|
+# Install Xorg, MATE Desktop, and others
|
|
|
RUN dpkg --add-architecture i386 && \
|
|
RUN dpkg --add-architecture i386 && \
|
|
|
- apt-get update && apt-get install -y \
|
|
|
|
|
|
|
+ apt-get update && apt-get install --no-install-recommends -y \
|
|
|
software-properties-common \
|
|
software-properties-common \
|
|
|
apt-utils \
|
|
apt-utils \
|
|
|
build-essential \
|
|
build-essential \
|
|
@@ -63,6 +71,7 @@ RUN dpkg --add-architecture i386 && \
|
|
|
libglvnd-dev \
|
|
libglvnd-dev \
|
|
|
pkg-config \
|
|
pkg-config \
|
|
|
mesa-utils \
|
|
mesa-utils \
|
|
|
|
|
+ mesa-utils-extra \
|
|
|
libglu1 \
|
|
libglu1 \
|
|
|
libglu1:i386 \
|
|
libglu1:i386 \
|
|
|
libsm6 \
|
|
libsm6 \
|
|
@@ -80,95 +89,126 @@ RUN dpkg --add-architecture i386 && \
|
|
|
xfonts-base \
|
|
xfonts-base \
|
|
|
xkb-data \
|
|
xkb-data \
|
|
|
libxrandr-dev \
|
|
libxrandr-dev \
|
|
|
- xorg-dev \
|
|
|
|
|
- ubuntu-mate-desktop && \
|
|
|
|
|
- if [ "$(grep VERSION_CODENAME= /etc/os-release | cut -d= -f2)" = "bionic" ]; then apt-get install -y --no-install-recommends vulkan-utils; else apt-get install -y --no-install-recommends vulkan-tools; fi && \
|
|
|
|
|
|
|
+ xorg-dev && \
|
|
|
|
|
+ apt-get install -y ubuntu-mate-desktop && \
|
|
|
|
|
+ if [ "${UBUNTU_RELEASE}" = "18.04" ]; then apt-get install --no-install-recommends -y vulkan-utils; else apt-get install --no-install-recommends -y vulkan-tools; fi && \
|
|
|
# Remove Bluetooth packages that throw errors
|
|
# Remove Bluetooth packages that throw errors
|
|
|
- apt-get autoremove --purge -y blueman bluez bluez-cups pulseaudio-module-bluetooth && \
|
|
|
|
|
|
|
+ apt-get autoremove --purge -y \
|
|
|
|
|
+ blueman \
|
|
|
|
|
+ pulseaudio-module-bluetooth && \
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
-# Wine and Winetricks, comment out the below lines to disable
|
|
|
|
|
-ARG WINE_BRANCH=stable
|
|
|
|
|
-RUN if [ "$(grep VERSION_CODENAME= /etc/os-release | cut -d= -f2)" = "bionic" ]; then add-apt-repository ppa:cybermax-dexter/sdl2-backport; fi && \
|
|
|
|
|
|
|
+# Wine, Winetricks, and PlayOnLinux, comment out the below lines to disable
|
|
|
|
|
+ARG WINE_BRANCH=devel
|
|
|
|
|
+RUN if [ "${UBUNTU_RELEASE}" = "18.04" ]; then add-apt-repository ppa:cybermax-dexter/sdl2-backport; fi && \
|
|
|
curl -fsSL https://dl.winehq.org/wine-builds/winehq.key | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - && \
|
|
curl -fsSL https://dl.winehq.org/wine-builds/winehq.key | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - && \
|
|
|
apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu/ $(grep VERSION_CODENAME= /etc/os-release | cut -d= -f2) main" && \
|
|
apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu/ $(grep VERSION_CODENAME= /etc/os-release | cut -d= -f2) main" && \
|
|
|
- apt-get update && apt-get install -y --install-recommends winehq-${WINE_BRANCH} && \
|
|
|
|
|
|
|
+ apt-get update && apt-get install -y \
|
|
|
|
|
+ winehq-${WINE_BRANCH} \
|
|
|
|
|
+ q4wine \
|
|
|
|
|
+ playonlinux && \
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
curl -fsSL -o /usr/bin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks && \
|
|
curl -fsSL -o /usr/bin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks && \
|
|
|
chmod 755 /usr/bin/winetricks && \
|
|
chmod 755 /usr/bin/winetricks && \
|
|
|
curl -fsSL -o /usr/share/bash-completion/completions/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks.bash-completion
|
|
curl -fsSL -o /usr/share/bash-completion/completions/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks.bash-completion
|
|
|
|
|
|
|
|
-# Apache Guacamole and x11vnc
|
|
|
|
|
-ENV TOMCAT_VERSION 9.0.50
|
|
|
|
|
-RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
- libcairo2-dev \
|
|
|
|
|
- libjpeg-turbo8-dev \
|
|
|
|
|
- libpng-dev \
|
|
|
|
|
- libtool-bin \
|
|
|
|
|
- libossp-uuid-dev \
|
|
|
|
|
- libavcodec-dev \
|
|
|
|
|
- libavformat-dev \
|
|
|
|
|
- libavutil-dev \
|
|
|
|
|
- libswscale-dev \
|
|
|
|
|
- freerdp2-dev \
|
|
|
|
|
- libpango1.0-dev \
|
|
|
|
|
- libssh2-1-dev \
|
|
|
|
|
- libtelnet-dev \
|
|
|
|
|
- libvncserver-dev \
|
|
|
|
|
- libwebsockets-dev \
|
|
|
|
|
- libpulse-dev \
|
|
|
|
|
- libssl-dev \
|
|
|
|
|
- libvorbis-dev \
|
|
|
|
|
- libwebp-dev \
|
|
|
|
|
- autoconf \
|
|
|
|
|
- automake \
|
|
|
|
|
- autotools-dev \
|
|
|
|
|
- pulseaudio \
|
|
|
|
|
- pavucontrol \
|
|
|
|
|
- openssh-server \
|
|
|
|
|
- openssh-sftp-server \
|
|
|
|
|
- default-jdk \
|
|
|
|
|
- maven \
|
|
|
|
|
- libxdamage-dev \
|
|
|
|
|
- libxinerama-dev \
|
|
|
|
|
- libxrandr-dev \
|
|
|
|
|
- libxss-dev \
|
|
|
|
|
- libxtst-dev \
|
|
|
|
|
- libv4l-dev \
|
|
|
|
|
- libavahi-client-dev \
|
|
|
|
|
- chrpath \
|
|
|
|
|
- debhelper && \
|
|
|
|
|
|
|
+# Install latest selkies-gstreamer (https://github.com/selkies-project/selkies-gstreamer) build, Python application, and web application
|
|
|
|
|
+RUN apt-get update && apt-get install --no-install-recommends -y \
|
|
|
|
|
+ build-essential \
|
|
|
|
|
+ python3-pip \
|
|
|
|
|
+ python3-dev \
|
|
|
|
|
+ python3-gi \
|
|
|
|
|
+ python3-setuptools \
|
|
|
|
|
+ python3-wheel \
|
|
|
|
|
+ tzdata \
|
|
|
|
|
+ sudo \
|
|
|
|
|
+ udev \
|
|
|
|
|
+ xclip \
|
|
|
|
|
+ x11-utils \
|
|
|
|
|
+ xdotool \
|
|
|
|
|
+ wmctrl \
|
|
|
|
|
+ jq \
|
|
|
|
|
+ gdebi-core \
|
|
|
|
|
+ x11-xserver-utils \
|
|
|
|
|
+ xserver-xorg-core \
|
|
|
|
|
+ libopus0 \
|
|
|
|
|
+ libgdk-pixbuf2.0-0 \
|
|
|
|
|
+ libsrtp2-1 \
|
|
|
|
|
+ libxdamage1 \
|
|
|
|
|
+ libxml2-dev \
|
|
|
|
|
+ libwebrtc-audio-processing1 \
|
|
|
|
|
+ libcairo-gobject2 \
|
|
|
|
|
+ pulseaudio \
|
|
|
|
|
+ libpulse0 \
|
|
|
|
|
+ libpangocairo-1.0-0 \
|
|
|
|
|
+ libgirepository1.0-dev && \
|
|
|
|
|
+ rm -rf /var/lib/apt/lists/* && \
|
|
|
|
|
+ cd /opt && \
|
|
|
|
|
+ SELKIES_VERSION=$(curl -fsSL "https://api.github.com/repos/selkies-project/selkies-gstreamer/releases/latest" | jq -r '.tag_name' | sed 's/[^0-9\.\-]*//g') && \
|
|
|
|
|
+ curl -fsSL "https://github.com/selkies-project/selkies-gstreamer/releases/download/v${SELKIES_VERSION}/selkies-gstreamer-v${SELKIES_VERSION}-ubuntu${UBUNTU_RELEASE}.tgz" | tar -zxf - && \
|
|
|
|
|
+ curl -O -fsSL "https://github.com/selkies-project/selkies-gstreamer/releases/download/v${SELKIES_VERSION}/selkies_gstreamer-${SELKIES_VERSION}-py3-none-any.whl" && pip3 install "selkies_gstreamer-${SELKIES_VERSION}-py3-none-any.whl" && rm -f "selkies_gstreamer-${SELKIES_VERSION}-py3-none-any.whl" && \
|
|
|
|
|
+ curl -fsSL "https://github.com/selkies-project/selkies-gstreamer/releases/download/v${SELKIES_VERSION}/selkies-gstreamer-web-v${SELKIES_VERSION}.tgz" | tar -zxf - && \
|
|
|
|
|
+ cd /usr/local/cuda/lib64 && sudo find . -maxdepth 1 -type l -name "*libnvrtc.so.*" -exec sh -c 'ln -sf $(basename {}) libnvrtc.so' \;
|
|
|
|
|
+
|
|
|
|
|
+# Install latest noVNC web interface for fallback
|
|
|
|
|
+RUN apt-get update && apt-get install --no-install-recommends -y \
|
|
|
|
|
+ autoconf \
|
|
|
|
|
+ automake \
|
|
|
|
|
+ autotools-dev \
|
|
|
|
|
+ chrpath \
|
|
|
|
|
+ debhelper \
|
|
|
|
|
+ jq \
|
|
|
|
|
+ python \
|
|
|
|
|
+ python-numpy \
|
|
|
|
|
+ python3 \
|
|
|
|
|
+ python3-numpy \
|
|
|
|
|
+ libc6-dev \
|
|
|
|
|
+ libcairo2-dev \
|
|
|
|
|
+ libjpeg-turbo8-dev \
|
|
|
|
|
+ libssl-dev \
|
|
|
|
|
+ libv4l-dev \
|
|
|
|
|
+ libvncserver-dev \
|
|
|
|
|
+ libtool-bin \
|
|
|
|
|
+ libxdamage-dev \
|
|
|
|
|
+ libxinerama-dev \
|
|
|
|
|
+ libxrandr-dev \
|
|
|
|
|
+ libxss-dev \
|
|
|
|
|
+ libxtst-dev \
|
|
|
|
|
+ libavahi-client-dev && \
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
git clone https://github.com/LibVNC/x11vnc.git /tmp/x11vnc && \
|
|
git clone https://github.com/LibVNC/x11vnc.git /tmp/x11vnc && \
|
|
|
cd /tmp/x11vnc && autoreconf -fi && ./configure && make install && cd / && rm -rf /tmp/* && \
|
|
cd /tmp/x11vnc && autoreconf -fi && ./configure && make install && cd / && rm -rf /tmp/* && \
|
|
|
- curl -fsSL https://archive.apache.org/dist/tomcat/tomcat-$(echo $TOMCAT_VERSION | cut -d "." -f 1)/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz | tar -xzf - -C /opt && \
|
|
|
|
|
- mv /opt/apache-tomcat-$TOMCAT_VERSION /opt/tomcat && \
|
|
|
|
|
- git clone https://github.com/apache/guacamole-server.git /tmp/guacamole-server && \
|
|
|
|
|
- cd /tmp/guacamole-server && autoreconf -fi && ./configure --with-init-dir=/etc/init.d && make install && ldconfig && cd / && rm -rf /tmp/* && \
|
|
|
|
|
- git clone https://github.com/apache/guacamole-client.git /tmp/guacamole-client && \
|
|
|
|
|
- cd /tmp/guacamole-client && JAVA_HOME=/usr/lib/jvm/default-java mvn package && rm -rf /opt/tomcat/webapps/* && mv guacamole/target/guacamole*.war /opt/tomcat/webapps/ROOT.war && chmod +x /opt/tomcat/webapps/ROOT.war && cd / && rm -rf /tmp/* && \
|
|
|
|
|
- echo "load-module module-native-protocol-tcp auth-ip-acl=127.0.0.0/8 auth-anonymous=1" >> /etc/pulse/default.pa
|
|
|
|
|
|
|
+ NOVNC_VERSION=$(curl -fsSL "https://api.github.com/repos/noVNC/noVNC/releases/latest" | jq -r '.tag_name' | sed 's/[^0-9\.\-]*//g') && \
|
|
|
|
|
+ curl -fsSL https://github.com/novnc/noVNC/archive/v${NOVNC_VERSION}.tar.gz | tar -xzf - -C /opt && \
|
|
|
|
|
+ mv /opt/noVNC-${NOVNC_VERSION} /opt/noVNC && \
|
|
|
|
|
+ ln -s /opt/noVNC/vnc.html /opt/noVNC/index.html && \
|
|
|
|
|
+ git clone https://github.com/novnc/websockify /opt/noVNC/utils/websockify
|
|
|
|
|
+
|
|
|
|
|
+# Add custom packages below this comment
|
|
|
|
|
|
|
|
# Create user with password ${PASSWD}
|
|
# Create user with password ${PASSWD}
|
|
|
-RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
|
|
+RUN apt-get update && apt-get install --no-install-recommends -y \
|
|
|
sudo && \
|
|
sudo && \
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
groupadd -g 1000 user && \
|
|
groupadd -g 1000 user && \
|
|
|
useradd -ms /bin/bash user -u 1000 -g 1000 && \
|
|
useradd -ms /bin/bash user -u 1000 -g 1000 && \
|
|
|
usermod -a -G adm,audio,cdrom,dialout,dip,fax,floppy,input,lp,lpadmin,netdev,plugdev,scanner,ssh,sudo,tape,tty,video,voice user && \
|
|
usermod -a -G adm,audio,cdrom,dialout,dip,fax,floppy,input,lp,lpadmin,netdev,plugdev,scanner,ssh,sudo,tape,tty,video,voice user && \
|
|
|
echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
|
|
echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
|
|
|
- chown -R user:user /home/user /opt/tomcat && \
|
|
|
|
|
|
|
+ chown -R user:user /home/user && \
|
|
|
echo "user:${PASSWD}" | chpasswd && \
|
|
echo "user:${PASSWD}" | chpasswd && \
|
|
|
ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" > /etc/timezone
|
|
ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" > /etc/timezone
|
|
|
|
|
|
|
|
COPY entrypoint.sh /etc/entrypoint.sh
|
|
COPY entrypoint.sh /etc/entrypoint.sh
|
|
|
RUN chmod 755 /etc/entrypoint.sh
|
|
RUN chmod 755 /etc/entrypoint.sh
|
|
|
|
|
+COPY selkies-gstreamer-entrypoint.sh /etc/selkies-gstreamer-entrypoint.sh
|
|
|
|
|
+RUN chmod 755 /etc/selkies-gstreamer-entrypoint.sh
|
|
|
COPY supervisord.conf /etc/supervisord.conf
|
|
COPY supervisord.conf /etc/supervisord.conf
|
|
|
RUN chmod 755 /etc/supervisord.conf
|
|
RUN chmod 755 /etc/supervisord.conf
|
|
|
|
|
|
|
|
EXPOSE 8080
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
USER user
|
|
USER user
|
|
|
|
|
+ENV USER=user
|
|
|
WORKDIR /home/user
|
|
WORKDIR /home/user
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/supervisord"]
|
|
ENTRYPOINT ["/usr/bin/supervisord"]
|