System Maintenance & Administration
Adding a new user or developer account
User accounts on the RTC, ICC, and AOC machines are members of
magaox. Developer accounts are additionally members of
magaox-dev and wheel.
/opt/MagAOX/source/MagAOX/setup/ contains scripts to help you
remember which groups and what permissions the ~/.ssh folder should
have.
add_a_user.sh
Creates a new user account in the group magaox, creates .ssh
(u=rwx,g=r,o=r), and .ssh/authorized_keys (u=rw,g=,o=).
Example:
$ /opt/MagAOX/source/MagAOX/setup/add_a_user.sh klmiller
add_a_developer.sh
Just like add_a_user.sh (in fact, uses it). Additionally adds the
new account to the wheel (RTC/ICC) or sudo (AOC) group and
magaox-dev groups.
Configuring git for a new user account
We use GitHub Personal Access Tokens coupled with HTTPS push to synchronize changes on the instrument. Configuration is required for your credentials to be remembered.
Log in to the computer (AOC, RTC, ICC, vm, etc) where you want to configure git
Change directories to a repository (e.g.
cd /opt/MagAOX/calib) and verify it is set up for HTTPS push:$ cd /opt/MagAOX/calib $ git remote -v origin https://github.com/magao-x/calib.git (fetch) origin https://github.com/magao-x/calib.git (push)
If you haven’t already for this machine, configure your name and email address:
$ git config --global user.email "youremailusernamehere@youremaildomainhere.com" $ git config --global user.name "Your Name Here"
Configure the ‘store’ credential helper, which will store your credentials so you do not have to re-enter them:
$ git config --global credential.helper store
Create (or retrieve from your password manager) a GitHub Personal Access Token. If you don’t have one, log in to GitHub and visit https://github.com/settings/tokens.
Attempt to push, and enter/paste your username and personal access token as password:
$ git push Username for 'https://github.com/magao-x/calib.git': your-github-user-name Password for 'https://your-github-user-name@github.com/magao-x/calib.git':
(Note that even if you don’t see it, your key is being entered.)
Attempt to push again. You should not be prompted for credentials a second time.
Upgrading NVIDIA CUDA and drivers
The CUDA install script at https://github.com/magao-x/MagAOX/blob/master/setup/steps/install_cuda.sh will install CUDA on a new system (provided that pre_provision.sh is run first, and the system is rebooted).
Upgrading CUDA is more involved, as the systems stubbornly insist on loading the driver even when asked nicely not to, and the installer won’t work if the driver is loaded.
(on AOC only) Default to text-based boot:
systemctl set-default multi-user.targetDisable all the driver modules.
Open
/etc/default/gruband append the following to the line beginningGRUB_CMDLINE_LINUX_DEFAULT(inside the quotes):nvidia_modeset.blacklist=1 nvidia_uvm.blacklist=1 nvidia.blacklist=1 rd.driver.blacklist=nvidia_modeset,nvidia_uvm,nvidia
Install the new config with
sudo grub2-mkconfig -o /boot/grub2/grub.cfgReboot, verify with
lsmod | grep nvthat no driver modules loadedUse
sudo /usr/bin/nvidia-uninstallto uninstall the driver (choosing “No” when asked whether to “attempt restoration of the original X configuration file”)Use
sudo /usr/local/cuda/bin/cuda-uninstallerto uninstall CUDA (checking all available options before choosing “Done”) This may leave a vestigial/usr/local/cudaXX.YYfolder (whereXX.YYis a version number) that can most likely be safely removed. (It’s probably just some temporary files that the installer didn’t create and is too polite to remove.)Remove the boot options that disable the driver.
Open
/etc/default/gruband remove the added options fromGRUB_CMDLINE_LINUX_DEFAULT.Install the new config with
sudo grub2-mkconfig -o /boot/grub2/grub.cfgReboot again! Verify no driver is loaded again!
Install CUDA using
sudo bash -x /opt/MagAOX/source/MagAOX/setup/steps/install_cuda.sh(on AOC only) Default to graphical boot again with
systemctl set-default graphical.targetand complete boot to graphical desktop withsystemctl isolate graphical.targetRebuild MAGMA with the new version of CUDA:
cd /opt/MagAOX/vendor/magma-X.Y.Z
make clean
make -j 32
make install
Upgrading the RT kernel
The CentOS 7 RT kernel includes backported patches from the mainline kernel to 3.10.0 where CentOS 7 was frozen, plus the PREEMPT RT patch set and bug fixes from newer versions of that. On occasion a new version will appear in the CentOS 7 RT package repository and it may be worth upgrading to see if any of our bugs are fixed.
Remove
versionlock(if any):yum versionlock delete kernel-rtsudo yum update kernel-rt kernel-rt-develReboot, verify new version in
uname -aReinstall drivers with kernel modules:
NVIDIA (all machines)
sudo /usr/bin/nvidia-uninstallUse
sudo /usr/local/cuda/bin/cuda-uninstallerto uninstall CUDA (checking all available options before choosing “Done”) This may leave a vestigial/usr/local/cudaXX.YYfolder (whereXX.YYis a version number) that can most likely be safely removed. (It’s probably just some temporary files that the installer didn’t create and is too polite to remove.)cd /opt/MagAOX/vendor/cudaandbash cuda_11.1.1_455.32.00_linux.run --extract=/tmp/cuda11(or as appropriate for the version of CUDA you have)Become root:
/usr/bin/sudo -icd /tmp/cuda11Verify
realpath $(which cc)is/usr/bin/gcc(and not the DevToolset-7 one)export IGNORE_PREEMPT_RT_PRESENCE=1Run the installer:
bash NVIDIA-Linux-x86_64-455.32.00.runOn next reboot, verify
nvidia-smiworks and shows all cards
EDT (RTC, ICC)
cd /opt/MagAOX/source/MagAOX/setup/stepssudo mv /opt/EDTpdv /opt/EDTpdv.oldkernelsudo bash install_edt.sh
ALPAO (RTC, ICC)
cd /opt/MagAOX/source/MagAOX/setup/stepssudo bash install_alpao.sh
BMC (RTC)
cd /opt/MagAOX/vendor/bmcsudo bash install.sh
Andor (ICC)
cd /opt/MagAOX/source/MagAOX/setup/stepsbash install_andor.sh
Reboot, verify hardware is working (e.g.
nvidia-smi, cameras all connecting, etc)