Tuesday, 28 March 2023

How to resolve the following c++ compilation error?

CUDA error: no kernel image is available for execution on the device

> check the cuda architecture version used in opencv CMakeLists.txt, 30 series should 8.6, 20 series should be 7.5


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

Please set them or make sure they are set and tested correctly in the CMake files:

CUDA_cublas_device_LIBRARY (ADVANCED)

   linked by target "caffe" in directory /home/jakebmalis/Documents/openpose/3rdparty/caffe/src/caffe

> check the cmake version, suggest to use 3.21, search how to install cmake 

Sunday, 26 March 2023

How to install and update libreoffice templates?

 https://github.com/dohliam/libreoffice-impress-templates/wiki/Ubuntu-Debian-Install-Guide

Monday, 13 March 2023

How to backup journald daily?

 #!/bin/bash


# Set the backup directory

BACKUP_DIR=/logs


# Create the backup directory if it doesn't exist

mkdir -p $BACKUP_DIR


# Get the current date in the format "YYYY-MM-DD"

DATE=$(date +%Y-%m-%d)

PREV_DATE=$(date -u -d "1 day ago 00:00:01" +"%Y-%m-%d %H:%M:%S")


# Loop through all running containers and backup their logs

for container in $(docker ps --format '{{.Names}}'); do

  journalctl -b CONTAINER_NAME=$container --since "$PREV_DATE" >> $BACKUP_DIR/$container-$DATE.log

done


---

You also need to set the /etc/docker/daemon and restart the docker

{
    "default-runtime": "nvidia",
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    },
    "log-driver": "journald"
}