Environment PATH & .bashrc

Add a dir to PATH

Add this line to .bashrc if your dir is “/home/yinggan/.local/bin”:

export PATH="/home/yinggan/.local/bin:$PATH"

Disk

Check disk status
df -h

Check file disk usage
du --max-depth=1 -h [file position]

You can search further for du command.

ls -lh

This also works.

Python Environment

VSC install tensorboard extension

The VSC auto run this command

/bin/python3 /home/yinggan/.vscode-server/extensions/ms-python.python-2022.10.1/pythonFiles/shell_exec.py /bin/python3 -m pip install -U tensorboard /tmp/tmp-3690113vmd9xrwV8cpD.log

And we also have warnings:

WARNING: The scripts pyrsa-decrypt, pyrsa-encrypt, pyrsa-keygen, pyrsa-priv2pub, pyrsa-sign and pyrsa-verify are installed in '/home/yinggan/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script google-oauthlib-tool is installed in '/home/yinggan/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script markdown_py is installed in '/home/yinggan/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script tensorboard is installed in '/home/yinggan/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Maybe the extension is not using any conda environment and the PATH is critical for it to function.

Related issue

CUDA Environment

Having both /cuda and /cuda-xx.x/cuda and /cuda-xx.x are the same. Actually /cuda is the symbolic link of /cuda-xx.x. ref

Check cuDNN version
 cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2

DNS

Possible DNS probe

A quick but not permanent way:

  1. Go to /etc
  2. Randomly select one from: 8.8.8.8/8.8.4.4/4.2.2.1/4.2.2.2
  3. Add nameserver xx.xx.xx.xx to /etc/resolv.conf right before the begining .

SSH&VNC

No ssh-copy-id on Windows

First run:

function ssh-copy-id([string]$userAtMachine, $args){   
    $publicKey = "$ENV:USERPROFILE" + "/.ssh/id_rsa.pub"
    if (!(Test-Path "$publicKey")){
        Write-Error "ERROR: failed to open ID file '$publicKey': No such file"            
    }
    else {
        & cat "$publicKey" | ssh $args $userAtMachine "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys || exit 1"      
    }
}

Then do ssh-copy-id as usual.

ref .

WSL

WSL with proxy

This seems to have multiple issues Use the following .sh script:

#!/bin/bash
host_ip=$(cat /etc/resolv.conf |grep "nameserver" |cut -f 2 -d " ")
export ALL_PROXY="http://$host_ip:7890"

ref .

Git

Git Symbol Error

Encounter:

/usr/lib/git-core/git-remote-https: symbol lookup error: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined symbol: ffi_type_pointer, version LIBFFI_BASE_7.0

Might be the result of configuring .bashrc for Isaac Gym.

Temporally do:

export LD_LIBRARY_PATH=/content/conda-env/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64

Then git push as usual.

Remember to source .bashrc for using python normally.

ref .