Skip to content

Instantly share code, notes, and snippets.

@AmosLewis
Last active April 17, 2024 03:46
Show Gist options
  • Save AmosLewis/523774f9d9a652d6f0672a69d83357f0 to your computer and use it in GitHub Desktop.
Save AmosLewis/523774f9d9a652d6f0672a69d83357f0 to your computer and use it in GitHub Desktop.
# Ubuntu 22 LTS
sudo apt install htop
sudo apt install curl
sudo apt install wget
sudo apt install git
sudo apt install clang-format
sudo apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# PYTHON
# curl -O https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.11
sudo apt install python3.11-venv
sudo apt-get install -y python3.11-dev
# CMAKE
sudo apt install gcc
sudo apt install g++
sudo apt install libssl-dev
sudo apt install make
wget https://github.com/Kitware/CMake/releases/download/v3.28.1/cmake-3.28.1.tar.gz
tar -axvf cmake-3.28.1.tar.gz
cd cmake-3.28.1/
./configure
make -j32
sudo make install
# CLANG
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 17
sudo apt install clang
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 100
# CCACHE
sudo apt install ccache
# NINJA
sudo wget -qO /usr/local/bin/ninja.gz https://github.com/ninja-build/ninja/releases/latest/download/ninja-linux.zip
sudo gunzip /usr/local/bin/ninja.gz
sudo chmod a+x /usr/local/bin/ninja
cd /
sudo mkdir /nodclouddata
sudo apt install nfs-common
sudo mount 10.123.61.130:/nodclouddata /nodclouddata
sudo vim /etc/fstab
10.123.61.130:/nodclouddata /nodclouddata nfs defaults,_netdev 0 0
@AmosLewis
Copy link
Author

AmosLewis commented Jan 16, 2024

Add pythonpath for vs code

cd src
touch .env
vim .env

Add this line
PYTHONPATH=/home/chi/src/SHARK:/home/chi/src/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir:/home/chi/src/iree-build/compiler/bindings/python:/home/chi/src/iree-build/runtime/bindings/python

setup setting.json for vs code

{
    "cmake.configureOnOpen": false,
    "files.associations": {
        "*.inc": "cpp"
    },
    "editor.tabSize": 2
}

@AmosLewis
Copy link
Author

AmosLewis commented Jan 16, 2024

Developing on VM using VS Code

To start developing on your VM using VS Code we’re going to set up a tunnel and authenticate using GitHub credentials.

  1. Install VS Code on your VM:

    wget -O vscode.deb "https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64"
    sudo apt install -y ./vscode.deb

  2. Set up a tunnel on your VM by typing

    code tunnel

  3. Follow the steps and authenticate using your GitHub credentials.

  4. Next up, on your local machine install Remote – Tunnels extension in VS Code.

  5. Open the command palette on VS Code (ctrl+shift+p) and type Connect to Tunnel.

  6. Authenticate again using your GitHub credentials and choose your VM name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment