mirror of
https://github.com/mempool/mempool.git
synced 2025-02-22 14:22:44 +01:00
Merge pull request #2451 from Emzy/ops/unfurler-gpu
Install nvidia-driver, xorg and chromium if GPU is pressent on prod install
This commit is contained in:
commit
2f42dc9898
1 changed files with 40 additions and 1 deletions
|
@ -400,6 +400,10 @@ FREEBSD_PKG+=(boost-libs autoconf automake gmake gcc libevent libtool pkgconf)
|
|||
FREEBSD_PKG+=(nginx rsync py39-certbot-nginx mariadb105-server keybase)
|
||||
FREEBSD_PKG+=(geoipupdate)
|
||||
|
||||
FREEBSD_UNFURL_PKG=()
|
||||
FREEBSD_UNFURL_PKG+=(nvidia-driver-470-470.129.06 chromium xinit xterm twm ja-sourcehansans-otf)
|
||||
FREEBSD_UNFURL_PKG+=(zh-sourcehansans-sc-otf ko-aleefonts-ttf lohit tlwg-ttf)
|
||||
|
||||
#############################
|
||||
##### utility functions #####
|
||||
#############################
|
||||
|
@ -1431,7 +1435,42 @@ if [ "${UNFURL_INSTALL}" = ON ];then
|
|||
case $OS in
|
||||
|
||||
FreeBSD)
|
||||
echo "[*] FIXME: Unfurl must be installed manually on FreeBSD"
|
||||
|
||||
if pciconf -lv|grep -i nvidia >/dev/null 2>&1;then
|
||||
echo "[*] GPU detected: Installing packages for Unfurl"
|
||||
osPackageInstall ${FREEBSD_UNFURL_PKG[@]}
|
||||
|
||||
echo 'allowed_users = anybody' >> /usr/local/etc/X11/Xwrapper.config
|
||||
echo 'kld_list="nvidia"' >> /etc/rc.conf
|
||||
echo 'nvidia_xorg_enable="YES"' >> /etc/rc.conf
|
||||
|
||||
echo "[*] Installing color emoji"
|
||||
osSudo "${ROOT_USER}" curl "https://github.com/samuelngs/apple-emoji-linux/releases/download/ios-15.4/AppleColorEmoji.ttf" -o /usr/local/share/fonts/TTF/AppleColorEmoji.ttf
|
||||
cat >> /usr/local/etc/fonts/conf.d/01-emoji.conf <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<match>
|
||||
<test name="family"><string>sans-serif</string></test>
|
||||
<edit name="family" mode="prepend" binding="strong">
|
||||
<string>Apple Color Emoji</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family"><string>serif</string></test>
|
||||
<edit name="family" mode="prepend" binding="strong">
|
||||
<string>Apple Color Emoji</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family"><string>Apple Color Emoji</string></test>
|
||||
<edit name="family" mode="prepend" binding="strong">
|
||||
<string>Apple Color Emoji</string>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
||||
EOF
|
||||
fi
|
||||
;;
|
||||
|
||||
Debian)
|
||||
|
|
Loading…
Add table
Reference in a new issue