Categories
Ubuntu

Solve /sbin/ldconfig.real: /usr/local/cuda-11.8/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8 is not a symbolic link

I received this error when installing packages in Ubuntu 23.10. To solve this issue, you can fix the CUDNN installation steps

  1. Check the ~/.bashrc
export PATH="/usr/local/cuda/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.8/lib64/

2. Copy CUDNN the right way

sudo cp -av include/cudnn*.h /usr/local/cuda/include
sudo cp -av lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*

This should fixed the not a symbolic link problems!

Categories
Anaconda

Install Miniforge /Mamba to replace Anaconda in Ubuntu

Moving to Miniforge / Mamba will help to doing packages installation faster. The first step is to uninstall Anaconda from your machine

Reverse any Anaconda scripts

conda activate
conda init --reverse --all

Remove Anaconda folders

rm -rf ~/anaconda3
rm -rf ~/.conda
rm -rf ~/.condarc

The Miniforge / Mamba Installation

wget -c https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
bash Miniforge3-Linux-x86_64.sh 

Load the environment

source ~/.bashrc
conda install conda-libmamba-solver

Now you are good!

Categories
Networking

Solve alpine APKINDEX.tar.gz no such file temporary error

I’m running DockerFile installation and when come to the part of installation APKIndex.tar.gz,


# Add additional repo's for apk to use
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.3/main > /etc/apk/repositories; \
    echo http://dl-cdn.alpinelinux.org/alpine/v3.3/community >> /etc/apk/repositories

I got error

RUN apk --update add wget tar bash coreutils procps openssl:                                                          
0.503 fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz                                                      
5.507 ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.3/main: temporary error (try again later)                                         
5.507 WARNING: Ignoring APKINDEX.5a59b88b.tar.gz: No such file or directory                                                            
5.507 fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz                                                 
10.51 ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.3/community: temporary error (try again later)
10.51 WARNING: Ignoring APKINDEX.7c1f02d6.tar.gz: No such file or directory
Categories
Ubuntu

Fix DuckDB out of memory error Export Database Parquet

I’m using the latest DuckDB 0.10.0 and receive memory error when exporting database with Parquet Format. I did with CSV and its work fine.

Memory configuration also set like :

SET memory_limit = '50GB';
SET max_memory = '50GB';
PRAGMA memory_limit=50GB;

This still trigger OOM. The only solution that works is

SET preserve_insertion_order = false;

Hope this help you in solving memory error using DuckDB.

Categories
Anaconda

Fix Tensorboard in VSCode repeating could not install tensorboard package.

Tensorboard and VSCode is already well-integrated. However, there is a slightly problem when running it using the latest version.

Tensorboard is installed, prompted to install repeatedly. It keep re-appearing to ask installing Tensorboard session package with the same result :

Could not install tensorboard. If pip is not available, please use the package manager of your choice to manually install this library into your Python environment

Apparently, the major culprit is VSCode using different Python interpreter than the selected kernel in notebook. In this case, I’m using Anaconda with specific environment that already have tensorboard installed. To solve this, the solution is very straightfoward.

Categories
Networking

Solve ASUS WRX80 SAGE ensure to connect the 8-pin power please enter setup to recover bios setting fatal error

This is the most frustated problem I have encountered when using Asus Pro WS WRX80E-SAGE SE WIFI Motherboard Pro WS WRX80E-SAGE SE WIFI. The issue appeared when I changed the BIOS settings to enable the “SR-IOV” feature with the hope of solving USB devices not detected and avoiding adding “pci=nommconf” in GRUB.

Once, I rebooted, it suddenly its showing AMI Megatrend where everything was being initialized properly, and the last message was “ensure to connect the 8-pin power please enter setup to recover bios setting fatal error”. There is BIOS page at beginning to press F2 or Del, however it was not responsive and back to AMI page.

Categories
Tensorflow

Solve TFX pip installation too long and slow

When installing TFX, I received error pip install tfx raises ResolutionTooDeep. During installation, its going over multiple different version of packages.

To solve this problem, I created requirements.txt with option to install necessary packages or all-packages that produced using pip freeze.

There are three options: TFX 1.10, 1.13 and the latest TFX 1.14.0

All the packages installation can be found here :

https://github.com/yodiaditya/datascience/tree/main/tfx

I hope this help you to solve TFX pip installation issues!

Categories
Tensorflow

Solve successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node

I got this error when running Tensorflow successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node,. To solve it

for a in /sys/bus/pci/devices/*; do echo 0 | sudo tee -a $a/numa_node; done
Categories
Tensorflow

Install Tensorflow 1 with RTX 4090 or CUDA 11 and 12

There is a quick way to install and run Tensorflow version 1 (eg: Tensorflow 1.5) in Ubuntu, RTX 4090 and CUDA 12. Here are quick step to do it.

  1. Install Python 3.6 or Python 3.8

Depending on your needs, you can setup this using anaconda

conda create -n 36 python=3.6
conda activate 36

2. Install NVIDIA python index

pip install --user nvidia-pyindex

3. Install Tensorflow 1.5 both GPU and CPU support

pip install --user nvidia-tensorflow[horovod]

Voila! Now you can run Tensorflow 1 using CUDA 11 or 12 on Ubuntu without problem.

Another alternative is using NVIDIA NGC.

Categories
Ubuntu

Adjust GPU Fan Speed NVIDIA on Ubuntu Server Headless

The problem when adjusting my dual RTX 4090 in Ubuntu Server 23.10 is, when running nvidia-settings its trigger error

ERROR: The control display is undefined; please run `nvidia-settings --help`
       for usage information.

I’ve been search on internet and not found a better solution, then I decided try to install X and attached, while running nvidia-setting. The result its works. Here are the step by step on how to enable GPU fan speed in Ubuntu Server 23.10

  1. Install XServer
sudo apt install -y xorg xinit

2. Give permission to run X for user

Edit the file and change console into anybody to give permission to running X

sudo vim /etc/X11/Xwrapper.config

If you don’t change this, it will trigger error

/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server