Raspberry Pi 4 OBS Virtual camera - camera

I wrote this bash file, but not working. I think RPI just 32bit and the package what I found 64bit. Do you have any idea, how to find 32bit version of the package or how can I solve the problem?
I used this repos:
https://github.com/umlaeute/v4l2loopback
https://github.com/CatxFish/obs-v4l2sink
This code was the base
https://obsproject.com/forum/threads/obs-raspberry-pi-build-instructions.115739/
#!/bin/bash
#########################################################
# delete unnessery programs from pi
#########################################################
sudo apt-get -y remove --purge libreoffice*
sudo apt-get -y remove --purge scratch2 minecraft-pi wolfram-engine sonic-pi dillo squeak-vm squeak-plugins-scratch geany
sudo apt-get clean
sudo apt-get -y autoremove
sudo apt-get update
sudo apt-get dist-upgrade
#########################################################
#install obs with virtual camera
#########################################################
#make swap file
sudo dd if=/dev/zero of=/var/swap2 bs=1024 count=1000000
sudo chmod 600 /var/swap2
sudo mkswap /var/swap2
sudo swapon /var/swap2
sudo swapon
#install obs
sudo apt install qtbase5-dev
mkdir -p ~/install
cd ~/install
git clone --recursive https://github.com/obsproject/obs-studio.git
sudo apt-get --allow-releaseinfo-change update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
sudo apt-get -y install build-essential checkinstall cmake libmbedtls-dev libasound2-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev libjack-jackd2-dev libjansson-dev libluajit-5.1-dev libpulse-dev libqt5x11extras5-dev libspeexdsp-dev libswresample-dev libswscale-dev libudev-dev libv4l-dev libvlc-dev libx11-dev libx11-xcb1 libx11-xcb-dev libxcb-xinput0 libxcb-xinput-dev libxcb-randr0 libxcb-randr0-dev libxcb-xfixes0 libxcb-xfixes0-dev libx264-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcomposite-dev libxinerama-dev pkg-config python3-dev qtbase5-dev libqt5svg5-dev swig
sudo wget http://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac1_0.1.4-2+b1_armhf.deb
sudo wget http://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_0.1.4-2+b1_armhf.deb
sudo dpkg -i libfdk-aac1_0.1.4-2+b1_armhf.deb
sudo dpkg -i libfdk-aac-dev_0.1.4-2+b1_armhf.deb
sudo git clone --recursive https://github.com/obsproject/obs-studio.git
cd obs-studio
sudo mkdir build && cd build
sudo cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
sudo make -j4
sudo make install
#install virtual cam
cd ~/install
sudo apt-get install -y v4l-utils v4l2loopback-utils
sudo wget http://raspbian.raspberrypi.org/raspbian/pool/main/v/v4l2loopback/v4l2loopback-dkms_0.12.5-1_all.deb
sudo apt-get install -y ~/install/v4l2loopback-dkms_0.12.5-1_all.deb
#install virtual cam obs plugin
cd ~/install
sudo wget https://github.com/CatxFish/obs-v4l2sink/releases/download/0.1.0/obs-v4l2sink.deb
sudo apt-get install -y ~/install/obs-v4l2sink.deb
mkdir -p ~/.config/obs-studio/plugins/v4l2sink/bin/64bit/
#run OBS
MESA_GL_VERSION_OVERRIDE=3.3 obs #only need to run this command from now on

Related

unable to install singularity in Centos or Ubuntu

I need help on how to install singularity in Centos or Ubuntu successfully. I followed https://docs.sylabs.io/guides/3.0/user-guide/installation.html#install-on-linux but basically package "singularity" is unavailable. Any thoughts? Thanks!
Ubuntu:
sudo apt-get install -y singularity-container
E: Package 'singularity-container' has no installation candidate
Centos7:
sudo yum update -y && \
> sudo yum install -y epel-release && \
> sudo yum update -y && \
> sudo yum install -y singularity-runtime singularity
No package singularity-runtime available.
No package singularity available.

pdf2htmlEX error during conversion - CMap is not valid and got dropped for font

I'm using this version https://github.com/pdf2htmlEX/pdf2htmlEX/releases/tag/v0.18.8.rc1
this debian version pdf2htmlEX-0.18.8.rc1-master-20200630-Ubuntu-focal-x86_64.deb
When I run the conversion I get a bunch of these errors:
Working: 97/100ToUnicode CMap is not valid and got dropped for font: b7
which result in empty files, without any text.
I'm running via docker, this is my dockerfile:
FROM ubuntu:20.04
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --configure -a
RUN apt-get clean
RUN apt-get update
RUN apt-get install -f -y python3
RUN apt-get install dialog apt-utils -y
RUN apt-get install -f -y python3-pip
RUN apt-get install -f -y python3-setuptools
RUN apt-get install -f -y wget
RUN apt-get install -f -y poppler-utils
RUN apt-get install -f -y poppler-data
RUN apt-get install -f -y jq
RUN apt-get install -f -y zip unzip
RUN apt-get install -f -y pdftk
RUN apt-get install -f -y ffmpeg
RUN apt-get install -f -y libfontforge-dev
RUN DEBIAN_FRONTEND=noninteractive; apt-get install -f -y pdftk-java
RUN apt install -f -y ghostscript
RUN pip3 install --upgrade pip \
&& apt-get clean
RUN pip3 --no-cache-dir install --upgrade awscli
WORKDIR /tmp
COPY lib/pdf2htmlEX-0.18.8.rc1-master-20200630-Ubuntu-focal-x86_64.deb /tmp
RUN apt install -y ./pdf2htmlEX-0.18.8.rc1-master-20200630-Ubuntu-focal-x86_64.deb
RUN wget https://www.imagemagick.org/download/ImageMagick.tar.gz && \
tar -xf ImageMagick.tar.gz && \
cd ImageMagick* && \
./configure && \
make && \
make install && \
ldconfig /usr/local/lib
Please advise how can I resolve this?

How can I install Tensorflow GPU with latest version of CUDA and cuDNN

Installing TensorFlow for object detection is annoying sometimes, especially when wired errors happen after starting one's own object detection project by finetuning pre-trained model.
How to install latest Tensorflow GPU support and latest CUDA/CUDNN without any error?
To install tensorflow-gpu object detection api on Ubuntu 16.04
upgrade system
sudo apt-get update
sudo apt-get upgrade
install basic packages
sudo apt-get install vim curl python-dev gnupg-curl python-tk git
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo -H python get-pip.py
install tensorflow-gpu (tensorflow version=1.14)
sudo -H pip install tensorflow-gpu
install CUDA (Final CUDA version = 10.1)
// Please turn off your secure boot from BIOS
sudo apt-get install gnupg-curl
// Here we install version 10.0 to avoid other issues. Later we can upgrade it to version 10.1
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_10.0.130-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
sudo apt-get update
install cuDNN (cuDNN version = 7.6.3.30-1, compatible to CUDA 10.1)
sudo apt-get install --no-install-recommends cuda-10-0
// restart your computer here
nvidia-smi.
sudo apt-get install --no-install-recommends libcudnn7=7.6.3.30-1+cuda10.0 libcudnn7-dev=7.6.3.30-1+cuda10.0
sudo apt-get install -y --no-install-recommends libnvinfer5=5.1.5-1+cuda10.0 libnvinfer-dev=5.1.5-1+cuda10.0
sudo apt-get update
// this upgrade command will upgrade your CUDA to version 10.1
sudo apt-get upgrade
sudo apt-get autoremove
install Tensorflow object detection api
sudo -H pip install Cython
sudo -H pip install contextlib2
sudo -H pip install pillow
sudo -H pip install lxml
sudo -H pip install jupyter
sudo -H pip install matplotlib
mkdir tensorflow
cd tensorflow
git clone https://github.com/tensorflow/models
// install protocbuf version 3.0.0
wget -O protobuf.zip https://github.com/google/protobuf/releases/download/v3.0.0/protoc-3.0.0-linux-x86_64.zip
unzip protobuf.zip
sudo cp ./bin/protoc /bin/
sudo cp -r ./include/google /usr/local/include/
cd tensorflow/models/research
protoc object_detection/protos/*.proto --python_out=.
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
make
cp -r pycocotools <path_to_tensorflow>/models/research/
Export Environment
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.1/lib64
export PYTHONPATH=$PYTHONPATH:~/tensorflow/models/research:~/tensorflow/models/research/object_detection/slim
Other
If we install CUDA 10.1 it may have a compatibility issue that libxxxx.so.10.0 is not found when you start training your project.
To solve them:
a. sudo ln -s /usr/lib/x86_64-linux-gnu/libcublas.so.10.1 /usr/local/cuda-10.1/lib64/libcublas.so.10.0
b. sudo ln -s /usr/local/cuda-10.1/lib64/libcudart.so.10.1 /usr/local/cuda-10.1/lib64/libcudart.so.10.0
c. sudo ln -s /usr/local/cuda-10.1/lib64/libcufft.so.10 /usr/local/cuda-10.1/lib64/libcufft.so.10.0
d. sudo ln -s /usr/local/cuda-10.1/lib64/libcurand.so.10 /usr/local/cuda-10.1/lib64/libcurand.so.10.0
e. sudo ln -s /usr/local/cuda-10.1/lib64/libcusolver.so.10 /usr/local/cuda-10.1/lib64/libcusolver.so.10.0
f. sudo ln -s /usr/local/cuda-10.1/lib64/libcusparse.so.10 /usr/local/cuda-10.1/lib64/libcusparse.so.10.0
All Set

"gnustep-config --objc-flags" no output

I try to do "gnustep-config --objc-flags" inside Docker/ubuntu and it gives me no output.
Dockerfile:
FROM ubuntu
RUN apt-get update && apt-get install -y fp-ide nodejs php5 ruby build-essential gobjc gnustep gnustep-devel
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN useradd john
Tried to reproduce your issue. Found what is missing from this bug
apt install make

rabbitmq settings do not persist while running dockerfile

I have any application for which I want to:
run rabbitmq-server
setup some queues and exchanges (I have a setuprabbit.py script for it)
and then run some scripts (that is done in supervisor)... But before that I have to set up rabbit
My Dockerfile looks like this:
RUN cd /var && wget -q http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.2/rabbitmq-server-generic-unix-2.8.2.tar.gz
RUN cd /var && tar -xzvf rabbitmq-server-generic-unix-2.8.2.tar.gz && rm rabbitmq-server-generic-unix-2.8.2.tar.gz
ENV PATH /var/rabbitmq_server-2.8.2/sbin/:$PATH
RUN rabbitmq-plugins enable rabbitmq_management && rabbitmq-server -detached && sleep 5 && cd /tmp/ && rabbitmqctl start_app && python buzz/scripts/setuprabbit.py
#RUN rabbitmq-server -detached && sleep 5 && cd /tmp/ && rabbitmqctl start_app && python buzz/scripts/setuprabbit.py
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
When I do a build it fails here (sudo docker build .)... It passes but I can see that by the time supervisor runs the scripts... rabbitmq is not longer running (rabbit node is down).
How do I persist rabbit setup e.t.c?
Here is my full Dockerfile:
FROM ubuntu:precise
MAINTAINER njain
#VOLUME ["home/njain/office/buzz"]
ADD . /tmp/
# DOCKER-VERSION 0.3.4
# Docker basics
RUN apt-get -y update
# EDITORS
#RUN apt-get install -y -q vim
## PYTHON
RUN apt-get install -y -q python-software-properties
RUN apt-get install -y -q python
RUN apt-get install -y -q python-setuptools
RUN apt-get install -y -q python-virtualenv
RUN apt-get install -y -q python-dev
RUN apt-get install -y -q python-distribute
#RUN apt-get install -y -q build-essential
RUN apt-get install -y -q python-pip
RUN pip --no-input install --upgrade pip
# LIBS
RUN apt-get install -y -q libjpeg8-dev
RUN apt-get install -y -q zlib1g-dev
RUN apt-get install -y -q libfreetype6-dev
RUN apt-get install -y -q liblcms1-dev
RUN apt-get install -y -q libwebp-dev
RUN apt-get install -y -q libtiff-dev
RUN apt-get install -y -q libffi-dev
# TOOLS
RUN apt-get install -y -q curl
RUN apt-get install -y -q git
RUN apt-get install -y -q vim
#RABBIT
RUN apt-get install -y -q rabbitmq-server
#RUN /usr/sbin/rabbitmq-plugins enable rabbitmq_management
# Install supervisor
RUN apt-get install -y supervisor
RUN mkdir -p /var/run/sshd
RUN mkdir -p /var/log/supervisor
RUN mkdir -p /etc/supervisor/conf.d
RUN mkdir -p /var/run/sshd /var/log/supervisor
COPY supervisord.conf /etc/supervisor/supervisord.conf
RUN pip --no-input install virtualenv
#RUN cd /tmp/
RUN cd /tmp/ && virtualenv buzzenv && python setup.py install
#RUN rabbitmq-server start &
#RUN python /tmp/buzz/scripts/setuprabbit.py
# Install RabbitMQ.
RUN apt-get update
RUN apt-get -f install
RUN apt-get install wget
#RUN \
#wget -qO - http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | apt-key add - && \
#echo "deb http://www.rabbitmq.com/debian/ testing main" > /etc/apt/sources.list.d/rabbitmq.list && \
#apt-get update && \
#DEBIAN_FRONTEND=noninteractive apt-get install -y rabbitmq-server && \
#rm -rf /var/lib/apt/lists/* && \
#rabbitmq-plugins enable rabbitmq_management && \
#echo "[{rabbit, [{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config
# Define RabbitMQ variables.
#RUN mkdir -p /data/mnesia
#RUN chown -R rabbitmq:rabbitmq /data
#ENV RABBITMQ_LOG_BASE /var/log/rabbitmq
#ENV RABBITMQ_MNESIA_BASE /data/mnesia
#EXPOSE 5672
#EXPOSE 15672
#RUN echo "NODENAME=rabbit#localhost" > /var/rabbitmq-env.conf
RUN cd /var && wget -q http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.2/rabbitmq-server-generic-unix-2.8.2.tar.gz
RUN cd /var && tar -xzvf rabbitmq-server-generic-unix-2.8.2.tar.gz && rm rabbitmq-server-generic-unix-2.8.2.tar.gz
ENV PATH /var/rabbitmq_server-2.8.2/sbin/:$PATH
RUN rabbitmq-plugins enable rabbitmq_management && rabbitmq-server -detached && sleep 5 && cd /tmp/ && rabbitmqctl start_app && python buzz/scripts/setuprabbit.py
#RUN rabbitmq-server -detached && sleep 5 && cd /tmp/ && rabbitmqctl start_app && python buzz/scripts/setuprabbit.py
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
Because of the way docker works... After I run
RUN rabbitmq-plugins enable rabbitmq_management && \
rabbitmq-server -detached && \
sleep 5 && \
cd /tmp/ && \
rabbitmqctl start_app && \
python buzz/scripts/setuprabbit.py
it stops the rabbit server.
To make sure the states are preserved, I needed to
RUN rabbitmq-plugins enable rabbitmq_management && \
rabbitmq-server -detached && \
sleep 5 && \
cd /tmp/ && \
rabbitmqctl start_app && \
python buzz/scripts/setuprabbit.py && \
rabbitmqctl stop_app
and then start rabbitmq-server again in the next step.