QUC Winter School on Energy Frontier (HEP) “Synergy with the Computing Frontier”
2021.12.27-12.30 Hybrid Format School |
Miscellaneous | Home > Miscellaneous |
How to install Docker
It is highly recommended to use Linux or Mac OS rather than Windows.
1. Windows (Windows 10 1903 or higher or Windows 11)
1.1 Install WSL2 with Linux kernel update package
- Turn on PowerShell and type following two command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- If done, restart windows.
- Install Linux kernel update package using following link:
- Change default version of WSL to WSL2 by typing following command on Powsrshell:
wsl --set-default-version 2
1.2 Install Docker Desktop
- Download Docker Desktop:
https://www.docker.com/products/docker-desktop
- Install Docker Desktop. Check ‘Install required Windows components for
WSL 2’ in Configuration Step.
- Start Docker Desktop
- From the Docker menu, select Setting > General. Then check ‘use the WSL 2 based engine’ if it isn’t enabled.
- From the Docker menu, select Setting > Resources. Then check ‘Enable integration with my default WSL distro’
- You can check the status of Docker Desktop by typing following command on
PowerShell:
wsl -l -v
References:
https://docs.docker.com/desktop/windows/wsl/
Note:
Instead of Powershell you can use the other shells such as Windows Terminal.
2. Linux (Ubuntu)
- Just type:
curl -fsSL https://get.docker.com/ | sudo sh
- Check docker by typing following command on Terminal:
docker version
(You may need to use sudo.)
3. Mac OS
- Download Docker Desktop:
https://www.docker.com/products/docker-desktop
- Install Docker Desktop by dragging Docker to Applications
- Start Docker App
- Start Terminal and docker by typing following command on Terminal:
docker version
How to run Docker
- After install docker, pull materials git repository:
git clone https://github.com/bostdiek/KIAS_Winter_School.git
- Then move into that directory and build docker by using following command:
docker build ./
(It will takes about 7gb storages.)
- Now launch the notebooks:
docker run -p 8888:8888 -it -v $PWD:$PWD -w $PWD -e JUPYTER_ENABLE_LAB=yes jupyter/tensorflow-notebook