Skip to content

Instantly share code, notes, and snippets.

@akochepasov
Last active January 12, 2022 22:55
Show Gist options
  • Save akochepasov/2f658e561e0b1ab1f85d76d474e56c0e to your computer and use it in GitHub Desktop.
Save akochepasov/2f658e561e0b1ab1f85d76d474e56c0e to your computer and use it in GitHub Desktop.

Install WSL2 in Win10

Install Docker

https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers#install-docker-desktop

Install CentOS through docker image (use tag centos:7)

https://docs.microsoft.com/en-us/windows/wsl/use-custom-distro
(set as default linux: wsl --set-default CentOS-7)

Install Dev tools from RH SCL

yum install centos-release-scl
yum install devtoolset-8
yum install rsync zip openssl openssl-devel
sudo yum-config-manager --enable rhel-server-rhscl-7-rpms
sudo yum-config-manager --list
change ~/.bash_profile
source scl_source enable devtoolset-8

Install git from IUS

yum remove git
yum install https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install git224

Systemd dev package

/bin/sudo yum install systemd-devel

Editors

sudo yum install mc vim

cmake 3.13.3 (compile from source)

wget cmake-3.*
tar zxvf cmake-3.*
cd cmake-3.*
./bootstrap --prefix=/usr/local
make -j$(nproc)
sudo make install

Setup DNS

/bin/sudo vim /etc/wsl.conf [network] generateResolvConf = false

search nanofluidics.com. nameserver 10.1.20.41 nameserver 10.10.1.11 nameserver 172.31.80.1

Clone repo

git clone --depth 10 <git_repo_url> --branch develop --single-branch <branch_name>

WSL nvidia driver

https://developer.nvidia.com/cuda/wsl/download

Install nvcc for CentOS 7

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo
yum --enablerepo=epel -y install cuda-toolkit-10-4

Ensure nvcc works

mkdir cuda-samples
cuda-install-samples-10.0.sh cuda-samples/
cd cuda-samples/NVIDIA_CUDA-10.0_Samples/0_Simple/simpleCallback
make

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