Saturday, May 4, 2019

Building Visual Studio Code on Jetson Nano

Here are the steps for building Visual Studio Code on Nvidia Jetson Nano.

Install nodejs

Visual Studio Code needs node version between 8 and 10. To install node 10 and yarn:

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

sudo apt-get install -y nodejs

curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt-get update && sudo apt-get install yarn


Install libraries 

We also need some libraries:

sudo apt-get install libx11-dev libxkbfile-dev libsecret-1-dev 


Clone and build Visual Studio Code

In a working directory, clone the source code and build.

git clone https://github.com/microsoft/vscode

cd vscode

scripts/npm.sh install


Edit 2019-06-15: To enable extensions, edit the product.json file and add the following:

"extensionsGallery": {
  "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
  "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
  "itemUrl": "https://marketplace.visualstudio.com/items"
}


To run Visual Studio Code:

scripts/code.sh

Friday, May 3, 2019

ROCm OpenCL with openSUSE Tumbleweed

With Tumbleweed running Linux kernel 5.0, it is easy to install ROCm OpenCL with upstream kernel.

- Go to http://repo.radeon.com/rocm/yum/rpm/ and download the latest version of following packages:

hsakmt-roct
hsa-rocr-dev
rocm-opencl
rocm-opencl-devel
rocminfo-1.0.0

- Install them without checking dependencies, assuming you already have libc etc packages installed, e.g.:

sudo rpm --nodeps -ivh hsakmt-roct-1.0.9-135-g34da614-Linux.rpm hsa-rocr-dev-1.1.9-64-g619177ee-Linux.rpm rocm-opencl-1.2.0-2019040803.x86_64.rpm rocm-opencl-devel-1.2.0-2019040803.x86_64.rpm rocminfo-1.0.0-Linux.rpm

- That's it! Optionally, install clinfo with zypper to check the available platform.  If you have been using Mesa OpenCL, you may want to uninstall it.