EMC Testnet Documentation: Quick Start Guide
  • EMC TESTNET
    • EMC Testnet Chain Documentation: Quick Start Guide
      • Introduction
      • Requirements
      • Setting Up the Development Environment
      • Testing
      • Conclusion
    • Estimate Gas Costs
      • What is Gas fee?
      • Methods to estimate gas costs
      • Precaution
      • Conclusion
    • EMC chain documents: Mainnet and Testnet
      • EMC mainnet
      • EMC Testnet
      • User Guide
      • Conclusion
    • Cross-chain messaging
      • What is cross-chain messaging?
      • Principle of cross-chain message passing
      • Implement cross-chain messaging
      • Conclusion
    • How to use oracles in applications
      • What is an oracle?
      • Steps to use oracle
      • Precautions
      • Conclusion
    • Precompilation
      • Overview of precompiled contracts
    • Functions of NodeInterface
      • Using NodeInterface
      • Conclusion
    • RPC endpoints and providers
      • Introduction
      • EMC Mainnet RPC endpoint
      • EMC Testnet RPC endpoint
      • User Guide
      • Conclusion
    • Block explorer
      • User Guide
    • Cross-chain bridge
      • Overview
      • Detailed operation rules and principles
  • EMC Airdrop Guidelines
    • EMC Airdrop Guidelines
      • What is EMC Public Testnet?
      • EMC Public Testnet Incentive Program
      • EMC Public Testnet Mining Rules
      • How to seek help if you encounter a problem?
      • How long will the EMC Public Testnet Mining Event last?
    • Wallet Setup
      • Method 1: One-Click Configuration (Recommended)
      • Method 2: Manual Configuration
        • EMC Testnet Network RPC Information
    • Faucets: Claim Test Tokens
    • Testnet Tutorial Guide
      • Windows Tutorial
        • Docker Installation and Setup Tutorial(Window Version)
      • MacOS Tutorial
      • Linux Tutorial
        • Docker Installation and NVIDIA GPU Configuration
        • EMC Client Installation and Operation
      • Windows CLI Tutorial
        • WSL Subsystem Installation
        • Install and Setup Docker Desktop
        • EMC CLI Download and Mining
        • Claim Gas Fee from EMC Community
    • EMC Testnet Blockchain Explorer
Powered by GitBook
On this page
  • 1. WSL pre-installation setup
  • 2. WSL Installation of Ubuntu
  1. EMC Airdrop Guidelines
  2. Testnet Tutorial Guide
  3. Windows CLI Tutorial

WSL Subsystem Installation

PreviousWindows CLI TutorialNextInstall and Setup Docker Desktop

Last updated 7 months ago

1. WSL pre-installation setup

1.1 Check if CPU Virtualization is enabled

Open Task Manager, click [Performance], and in the pop-up window, check if virtualization is enabled.

1.2 Enable Virtual Machine and Windows Subsystem

As shown in the image above, Open the Control Panel, go to Programs and Features, click "Turn Windows Features on or off," and check the relevant features in the pop-up window. Restart the computer to apply the changes.

2. WSL Installation of Ubuntu

2.1 WSL installation and version update

In Windows Powershell (run as administrator), enter wsl --update to start installing wsl or a newer version.

2.2 WSL Install Ubuntu Subsystem

In Windows Powershell (run by the administrator), enter the following command to install:

# View available versions online
wsl --list --online

# Install Ubuntu 22.04
wsl --install -d Ubuntu-22.04

Enter your username and password to create an Ubuntu user account.

As shown in the above figure, the Ubuntu 22.04 subsystem has been successfully installed.

2.3 Install Docker In The Ubuntu subsystem.

Enter docker info to check if the subsystem already has a docker service.

If it is already present, installation is not needed. Otherwise, use the following command in Ubuntu to install:

sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install docker.io 

2.4 Install Graphics Driver For Ubuntu Subsystem

View graphics card information

If the results match the image above, no further action is required.

NVIDIA Container Runtime Installation and Usage

With NVIDIA Container Runtime, registers a new runtime during container creation to expose the NVIDIA GPU to applications in the container.

# Add Library

curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
    
sudo apt-get update

# Install nvidia-container-runtime

sudo apt-get install nvidia-container-runtime
systemctl restart docker

#Verify if the installation was successful.

sudo docker run --gpus all --rm nvidia/cuda:12.0.1-base-ubuntu22.04 nvidia-smi

At this point, the WSL installation and Ubuntu subsystem setup are complete.

Note:The above command should match your Ubuntu version; for details, refer to:

https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda