public:docker
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
public:docker [2025/02/22 11:34] – liang | public:docker [2025/02/23 23:03] (current) – [Step 4: Work with PyTorch] liang | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Last-updated: | + | Last-updated: |
====== Docker tutorial ====== | ====== Docker tutorial ====== | ||
- | * Step 1: | + | ===== Step 1: Understand docker ===== |
+ | |||
+ | * Read https:// | ||
+ | * Install docker (Linux Mint as example. Information on other OSes are welcome too.) | ||
+ | * $ sudo apt install docker.io | ||
+ | * Add your username to the " | ||
+ | * $ sudo usermod -aG docker your_username | ||
+ | * Logout & login to make the change of group into effect, or simply reboot your Linux. | ||
+ | * Run a ubuntu container (docker client will automatically pull a ubuntu | ||
+ | * $ docker run -i -t ubuntu /bin/bash | ||
+ | * Exit the container | ||
+ | * # exit | ||
+ | |||
+ | ===== Step 2 (if you have an NVidia GPU): Install Nvidia GPU support ===== | ||
+ | |||
+ | * Follow https:// | ||
+ | |||
+ | ===== Step 3: Install PyTorch (for development) ===== | ||
+ | |||
+ | * $ docker pull pytorch/ | ||
+ | * $ docker run --rm --gpus all pytorch/ | ||
+ | * If you see " | ||
+ | |||
+ | ===== Step 4: Work with PyTorch ===== | ||
+ | |||
+ | * $ docker run -it --gpus all --rm pytorch/ | ||
+ | * # nvidia-smi | ||
+ | * If you see the use of your GPU, it worked. | ||
+ | |||
+ | ===== References ===== | ||
+ | |||
+ | * https:// | ||
public/docker.1740191649.txt.gz · Last modified: 2025/02/22 11:34 by liang