본문 바로가기

Linux

Run multiple shell scripts in different folders sequentially (1) Let's say we have the folder structure like Parent |--- Child0 |--- Child1 and each Sub-folder (Child) has a shell script file 'Run_Child.sh'. (2) Then, create a schell script file 'Run_Parent.sh' and write the following commands for d in 0 1; do cd "Child$d" && sh Run_Child.sh; cd ../ done Run_Parent.sh should be placed at Parent folder. (3) Finally, run the script like ~/Parent$ sh Run_Par.. 더보기
at 사용법 - 설치 $ sudo apt-get install at - 사용 법 1) $ at now+값 minutes/hours/days -f 실행파일명 예시) $ at now+1 minutes -f run_demo.sh $ at now+1 hours -f run_demo.sh $ at now+1 days -f run_demo.sh - 사용 법 2) $ at hh:mm yyyy-mm-dd -f 실행파일명 예시) $ at 12:12 2023-10-24 -f run_demo.sh - 대기열 확인 atq - 대기열의 작업 제거 atrm 번호 더보기
execution time scheduler 'at' ** First of all, you need to install 'at' via** $ sudo apt-get install at 1. Check current system time $ date fri nov 11 15:50:58 -03 2022 2. reservate execution time throught 'at' command $ at 15:52 -f ./myscript.sh warning: commands will be executed using /bin/sh job 4 at Fri Nov 11 15:52:00 2022 ** more examples ** $ at now + 1 min -f ./myscript.sh 3. list of queued task $ atq 3 Fri Jun 23 08.. 더보기
Draw HSV color wheel # color pallet grid_2D = grid_3D[0, :2].view(2, -1) # 2 (h w) radius = grid_2D.pow(2).sum(0).unsqueeze(0) # 1 (h w) radius = radius / radius.max() radian = torch.atan2(grid_2D[1], grid_2D[0]) chk_m = radian < 0 radian[chk_m] += 2 * np.pi # from (-pi, pi) to (0, 2pi) h = (radian-radian.min()) / (radian.max()-radian.min()) # normalized from 0-1 s = radius # saturation is set as a function of radia.. 더보기
CUDA Installation error, NVIDIA-drm in use 1) Download the latest CUDA Toolkit 2) Switch to tty3 by pressing Ctl+Alt+F3 3) Unload nvidia-drm before proceeding. 3a) Isolate multi-user.target sudo systemctl isolate multi-user.target 3b) Note that nvidia-drm is currently in use. lsmod | grep nvidia.drm 3c) Unload nvidia-drm sudo modprobe -r nvidia-drm 4d) Note that nvidia-drm is not in use anymore. lsmod | grep nvidia.drm 5) Go to your down.. 더보기
myelin error in operator(): 1 (myelinversionmismatch : compiled assuming that device 0 was sm 75, but device 0 is sm 0. ) Remove the existing graphic driver and re-install it!!! 더보기
Install OpenCV + Cuda + cuDNN + TensorRT on Ubuntu 18.04 1. Install OpenCV a) install required packages $ sudo apt-get install build-essential cmake $ sudo apt-get install pkg-config $ sudo apt-get install libjpeg-dev libtiff5-dev libpng-dev $ sudo apt-get install ffmpeg libavcodec-dev libavformat-dev libswscale-dev libxvidcore-dev libx264-dev libxine2-dev $ sudo apt-get install libv4l-dev v4l-utils $ sudo apt-get install libgstreamer1.0-dev libgstrea.. 더보기
Basic Shell Script (for/if/echo) Example with Python Run #!/bin/bash for dataset in 3do for exp in 30 31 32 do if [ ${exp} -eq 30 ];then gamma=0.001 elif [ ${exp} -eq 31 ];then gamma=0.01 else gamma=0.1fi python crowd_train.py \--dataset_num ${dataset} \--exp_id ${exp} \--gpu_num 1 \--rnn_size 32 \--lambda_param 0.0001 \--gamma_param ${gamma} \--max_num_peds 40 \--social_range 2 \--grid_size 8 \--batch_size 1 \--is_pretrain 0 \--load_pretrained 0 \--d.. 더보기
Basic Shell Script (for/if/echo) Example #!/bin/bash for dataset in 3do for exp in 30 31 32 do if [ ${exp} -eq 30 ];then lambda=0.001 elif [ ${exp} -eq 31 ];then lambda=0.01 else lambda=0.1fi echo "dataset: ${dataset}, exp id: ${exp}, lambda: ${lambda}" donedone 더보기
Permission denied error when update anaconda3 or installing tensorflow using anaconda sudo chown -R user anaconda3 더보기