Skip to content

Latest commit

 

History

History
135 lines (112 loc) · 4.38 KB

notes.md

File metadata and controls

135 lines (112 loc) · 4.38 KB

📝 Notes

🛠️ Set-up

/space/tools/scripts/setupFramework.sh
  • Select:
    • Virtualenv
    • self_supervised_learning
    • [keep default]
    • Basic
    • Tested
    • Python 3.8.15
    • GPU
    • CUDA 11.5
  • Activate Python virtual environment:
cd /home/self_supervised_tmp/self_supervised_learning
source start
  • Set-up project:
# Set-up Git project
mkdir dev
cd dev
sudo apt install -y git
git config --local user.name "FABallemand"
git config --local user.email "allemand.fabien@orange.fr"
git clone https://github.com/FABallemand/ProjetCassiopee
cd ProjetCassiopee

# Download utility
sudo apt install htop

# Download data
pip3 install gdown
sudo apt-get install -y p7zip-full p7zip-rar
nohup ./data/RGB-D_Object/download.sh &
nohup ./data/mocaplab/download.sh &

# Set-up Jupyter
# https://janakiev.com/blog/jupyter-virtual-envs/#add-virtual-environment-to-jupyter-notebook
# Deactivate virtual environment?
pip3 install --user ipykernel
python3 -m ipykernel install --user --name=self_supervised_learning
jupyter kernelspec list

# Download requirements
pip3 install -r requirement.txt
pip3 install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113

💾 Useful Commands

Data

tar -xvf file.tar
tar -xzvf file.tar.gz

7za x file.zip -ooutput/path

# Download Google Drive folder/file
gdown --folder link/to/folder -O /path/to/dir

# Copy folder/file from local to server
scp -r /path/to/local/dir user@remotehost:/path/to/remote/dir

Python

# Run program with nohup (see also tmux)
nohup python3 -u main.py &

Debugging

# Kill nohup process
# https://stackoverflow.com/questions/17385794/how-to-get-the-process-id-to-kill-a-nohup-process

# Run program with CUDA_LAUNCH_BLOCKING=1
CUDA_LAUNCH_BLOCKING=1 nohup python3 -u main.py &

# Reboot server
sudo reboot now

# Clear RAM cache
sudo sync; echo 1 > /proc/sys/vm/drop_caches

# Kill all process using pattern
pkill -f <pattern>

# "Restart" GPU on Ubuntu
# https://discuss.pytorch.org/t/cuda-fails-to-reinitialize-after-system-suspend/158108/3
sudo rmmod nvidia_uvm
sudo modprobe nvidia_uvm

# Debugging tool
dmesg | grep GPU

# Read end of file
# https://kb.iu.edu/d/acrj
tail [ +-[number][lbcr] ] [file]

🗂️ Dataset

🖥️ Code

🧠 AI

📋 ToDo

  • [] ...