ls -d ./*/其實是想要找出最大 size 的 folder...
ls -d ./*/ | xargs du -sc | sort -n
ls -d ./*/其實是想要找出最大 size 的 folder...
ls -d ./*/ | xargs du -sc | sort -n
real 3m48.122s user 4m44.344s sys 0m15.251s
$ python -m torch.utils.collect_env Collecting environment information... PyTorch version: 1.11.0+cu102 Is debug build: False CUDA used to build PyTorch: 10.2 ROCM used to build PyTorch: N/A OS: Ubuntu 18.04.5 LTS (x86_64) GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Clang version: Could not collect CMake version: version 3.10.2 Libc version: glibc-2.27 Python version: 3.10.4 (main, Mar 31 2022, 08:41:55) [GCC 7.5.0] (64-bit runtime) Python platform: Linux-4.15.0-166-generic-x86_64-with-glibc2.27 Is CUDA available: True CUDA runtime version: 10.2.89 GPU models and configuration: GPU 0: TITAN RTX Nvidia driver version: 460.91.03 cuDNN version: Probably one of the following: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn.so.7.6.5 HIP runtime version: N/A MIOpen runtime version: N/A Versions of relevant libraries: [pip3] numpy==1.23.0 [pip3] torch==1.11.0 [pip3] torchvision==0.12.0 [conda] numpy 1.23.0 pypi_0 pypi [conda] torch 1.11.0 pypi_0 pypi [conda] torchvision 0.12.0 pypi_0 pypi使用: url 指定 whl/cu116:
$ python -m torch.utils.collect_env Collecting environment information... PyTorch version: 1.12.0+cu116 Is debug build: False CUDA used to build PyTorch: 11.6 ROCM used to build PyTorch: N/A OS: Ubuntu 18.04.5 LTS (x86_64) GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Clang version: Could not collect CMake version: version 3.10.2 Libc version: glibc-2.27 Python version: 3.10.4 (main, Mar 31 2022, 08:41:55) [GCC 7.5.0] (64-bit runtime) Python platform: Linux-4.15.0-166-generic-x86_64-with-glibc2.27 Is CUDA available: True CUDA runtime version: 10.2.89 GPU models and configuration: GPU 0: TITAN RTX Nvidia driver version: 460.91.03 cuDNN version: Probably one of the following: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn.so.7.6.5 HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True Versions of relevant libraries: [pip3] numpy==1.23.0 [pip3] torch==1.12.0+cu116 [pip3] torchaudio==0.12.0+cu116 [pip3] torchvision==0.13.0+cu116 [conda] numpy 1.23.0 pypi_0 pypi [conda] torch 1.12.0+cu116 pypi_0 pypi [conda] torchaudio 0.12.0+cu116 pypi_0 pypi [conda] torchvision 0.13.0+cu116 pypi_0 pypi
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113-- cpu 的話,就 cu113 改 cpu。
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch-- cpu 的話就是 cudatoolkit=11.3 改成 cpuonly
torch>=1.7.0沒有指定 ..
Python 3.7.0 required by YOLOv5
mkdir pibuildroot && cd pibuildroot wget ... tar zxvf .. cd ..看一下 board 下面很多 raspberrypiX 都 ln 到 raspberrypi。
make raspberrypi3_defconfig用 make help 會列出一堆 make target。
Target packages -- Libraries -- Other從 linux-pam 的說明(警告),說,linux-pam 要 clibc 或是 glibc 才行。
auth required pam_securetty.so然後新增一個 /etc/securetty 空檔案。
console-- 因為用 w 看,login TTY 是 console,不是 tty1, ttyS0 之類,所以用 console
# PAM support requires thread support in the toolchain ifeq ($(BR2_PACKAGE_LINUX_PAM)$(BR2_TOOLCHAIN_HAS_THREADS),yy) define BUSYBOX_LINUX_PAM $(call KCONFIG_ENABLE_OPT,CONFIG_PAM,$(BUSYBOX_BUILD_CONFIG)) endef BUSYBOX_DEPENDENCIES += linux-pam else define BUSYBOX_LINUX_PAM $(call KCONFIG_DISABLE_OPT,CONFIG_PAM,$(BUSYBOX_BUILD_CONFIG)) endef endif所以會根據buildroot 的 PAM check/uncheck disable/disable busybox 的 PAM 設定。
: set list這樣,non ascii code 會high light 出來。
/[^\x00-\x7F]就會一個一個搜尋出來 (用 n)
/[\x9c]
mplayer -loop 0 -screen 0 -fs *
export DISPLAY=:0再播。
mpv --screen=0 myfile.mp4--screen=1 的話就會播到令一個 monitor
gdb --args executablename arg1 arg2 arg3進入 gdb 後,用指令 directory 指定source code 所在位置 (absolute path)
gdb> directory /data/
(lmdb) charles-chang@e431focal:~$ python Python 3.10.4 (main, Mar 31 2022, 08:41:55) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import lmdb >>> env = lmdb.open('./mender-store',subdir=False) >>> txn = env.begin() >>> myList = [ key for key, _ in txn.cursor()] >>> print(myList) [b'artifact-name', b'artifact-provides', b'authtoken'] >>> >>>print(txn.cursor().get(b'artifact-name')) b'1.0.1.30rc1-deltafrom-1.0.0.28patch3' >>> print(txn.cursor().get(b'artifact-providese')) None >>> print(txn.cursor().get(b'artifact-provides')) b'{"rootfs-image.checksum":"457d85413d8dbdb2c278b4740493efb3712290f36668a919dd4297ae60ca6157","rootfs-image.version":"1.0.1.30rc1"}'
>>> import lmdb >>> env = lmdb.open('./testlmdb') >>> txn = env.begin(write=True) >>> txn.put(key=b'1',value=b'abc') True >>> txn.put(key=b'aaa',value=b'{a=1},{b=2}') True >>> txn.commit() >>> txn = env.begin() >>> for key,value in txn.cursor(): ... print(key,value) ... b'1' b'abc' b'aaa' b'{a=1},{b=2}'
./mydb ./mender-store artifact-provides "{\"rootfs-image.checksum\":\"457d85413d8dbdb2c278b4740493efb3712290f36668a919dd4297ae60ca6157\",\"rootfs-image.version\":\"1.0.1.30rc1\"}"就可以新增 value