Installation for Linux: Difference between revisions

From Global Meteor Network
Jump to navigation Jump to search
No edit summary
No edit summary
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=== Installation for Linux ===
=== Installation for Linux ===


The scripts linked below have been tested under Ubuntu 20.4 LTS and 20.10, and Debian 10 (Buster) and will work fine for both desktop and server variants and likely other Debian based distros like Mint.


Because of package name differences and in Buster the broken state of the xcb-utils package the installer is hard-coded to detect either of these distro variants and install the correct packages, so if you want to install to some other flavour then you'll likely need to roll-your-own, albeit the install script will give you a good starting point.


To start, download both of the following to your home directory (~/)
To streamline the maintenance of these scripts as the RMS codebase evolves the install code for Linux has been moved to reside in the MultiCam directory maintained in the RMS github pages.


'''wget https://gist.githubusercontent.com/edharman/dc8dc37d5f9216c97c345c6b0abab251/raw/4a11cfbc508eed48ce6143e2b4c50850d393bd7f/install.sh'''
For single station use follow the MultiCam instructions and let the script proceed to install RMS and at the point the user is prompted  -


'''wget https://gist.githubusercontent.com/edharman/dc8dc37d5f9216c97c345c6b0abab251/raw/4a11cfbc508eed48ce6143e2b4c50850d393bd7f/opencv4_install.sh'''
Do you wish to configure some stations?


You should have 2 new files in your directory-
Exit the script by typing N or n
install.sh


opencv4_install.sh
The script will then exit and leave you at the default shell prompt with RMS installed with the default camera configuration location residing in -


Next -
~/source/RMS


'''chmod +x *.sh'''


You may want to edit the opencv4_install.sh to both reflect the GPU you may be using and optimise the compile time by adjusting the number of threads to use whilst compiling - this is controlled by the line
Detailed instructions [https://docs.google.com/document/d/e/2PACX-1vTh_CtwxKu3_vxB6YpEoctLpsn5-v677qJgWsYi6gEr_QKacrfrfIz4lFM1l-CZO86t1HwFfk3P5Nb6/pub here]
 
make -j4    --  4 being the No. of threads to use
 
If using an NVIDIA GPU you'll need to google for the device specific instructions and compile flags..
 
 
By default VAAPI support is assumed and both gstreamer and ffmpeg capture enabled, so if you are using Intel chipsets with Iris integrated GPU's you are good to go, albeit you will need to install the Intel drivers and VAAPI support Ubuntu instructions [http://lifestyletransfer.com/how-to-install-gstreamer-vaapi-plugins-on-ubuntu/]
 
The install procedure at some point clones the opencv repository which itself contains an opencv4_intall.sh which is not optimised for Intel chipsets, however this install script will copy the one from your home directory and execute that instead.
 
Next execute the install script -
 
'''./install.sh'''
 
You will immediately be prompted to enter your sudo password before the procedure continues....
 
If you are installing on a Debian distro the script will then run without intervention to completion, if using a Ubuntu distro you will at some point be prompted to accept an EULA licence for the TrueType fonts install.
 
Since you likely have not got mouse support in a terminal window to navigate the EULA screens -
 
At the first screen, hit the tab button and the <OK> box should be highlighted red, then hit return.
 
At the second screen hit the tab once and the <Yes> option should be highlighted in red, then press return -  the install process will then continue to completion.
 
The install script may take some time dependant on the hardware you have, I have tested this on an Intel i3 physical server and on an i6 running VM's under Hyper-V and on the latter with 10 threads enabled the install time is under 30 minutes, YMMV..
 
Upon completion (and I am assuming a headless 'server' distro install) in the shell window -
 
 
'''source vRMS/bin/activate'''  # to enter the vRMS env
 
'''cd source/RMS'''            # to enter the default working directory
 
Next steps are to edit and customise your .config file to reflect your station location, camera config and storage directory and any other site specific details -
 
 
'''nano ./config'''
 
Assuming you are using an IP camera the capture device string will be something like -
 
1. using gstreamer with VAAPI acceleration -
 
'''device: rtspsrc location=rtsp://192.168.0.150:554/user=admin&password=&channel=1&stream=0.sdp ! rtpjitterbuffer ! rtph264depay  ! h264parse ! vaapidecodebin ! videoconvert ! appsink'''
 
2. Alternatively using FFMPEG with no hardware acceleration -
 
'''device: rtsp://<camera-ip>:554/user=admin&password=&channel=1&stream=0.sdp'''
 
 
Save the .config and test that you can see the camera stream -
 
On a desktop run the ShowLiveStream script by clicking on the icon
 
On a headless machine (and assuming you have X-11 forwarding support '''and''' a remote X-11-Server on your desktop , more on that in another post [https://gist.github.com/edharman/2ab7976a71c413e9617add12dc94b278 here]...
 
In the shell terminal -
 
'''python -m Utils.ShowLiveStream'''
 
...after a few seconds whilst cpython will check it is up to date you should see a new window open showing the live stream..
 
Hitting CTRL-C in the launch window will kill it...
 
To start a capture  -
On a desktop install click the RMS_StartCapture link on the desktop.
 
On a headless system I use  -
 
'''nohup ./Scripts/RMS_StartCapture.sh &> /dev/null &'''
 
This redirects stderr & stdout to /dev/null (i.e. throws it away) and the final & backgrounds the process so the you can disconnect the terminal session and leave the process running.
 
To run SkyFit2  -
 
'''python -m Utils.SkyFit2 <path to .fits capture directory>'''
 
I find this is pretty quick and responsive even on a lowly i3 processor and running headless.

Latest revision as of 09:55, 20 August 2024

Installation for Linux

To streamline the maintenance of these scripts as the RMS codebase evolves the install code for Linux has been moved to reside in the MultiCam directory maintained in the RMS github pages.

For single station use follow the MultiCam instructions and let the script proceed to install RMS and at the point the user is prompted -

Do you wish to configure some stations?

Exit the script by typing N or n

The script will then exit and leave you at the default shell prompt with RMS installed with the default camera configuration location residing in -

~/source/RMS


Detailed instructions here