jungseokhong / Docker-for-AI-Researcher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker for A.I. Researcher

Docker Cloud Build Status Docker Pulls GitHub

"Docker for A.I. Researcher" is a series of Shell script that

  • Allows you to quickly set up your deep learning research environment.
  • Supports SSH! Remote work with laptop OUTSIDE of the box.
  • Supports the next-generation pytorch library, pytorch-lightning.
  • Includes fancy terminal setup with oh-my-zsh.

Demo

Docker: Try it on Binder


1. Requirements

  • Nvidia GPU Driver Installation
  • 10 minuites

2. What's inside?

├── src/
│   ├── Dockerfile
│   └── requirements.txt
├── .env
├── 1_1-install_nvidia_driver.sh
├── 1_2-terminal_setting.sh
├── 2-docker_install.sh
├── 3-docker_build.sh
├── 4-run_docker.sh
└── 5-setting_alias.sh
  • 1_1-install_nvidia_driver.sh : Install NVIDIA Driver
  • 1_2-terminal_setting.sh : Setting Terminal with zsh
  • 2-docker_install.sh : Install Docker + NvidiaDocker2
  • 3-docker_build.sh : Build docker image.
  • 4-run_docker.sh : Run Docker Container.
  • 5-setting_alias.sh : Optional. Setting alias for conviniences.

3. Quick Start

step 1. clone the repository

sudo apt-get install git
git clone https://github.com/eungbean/Docker-for-AI-Researcher
cd Docker-for-AI-Researcher

Step 2. Install NVIDIA Driver and Terminal setup.

./1_1-install_nvidia_driver.sh
./1_2-terminal_setting.sh

Install following packages.

  • NVidia Driver
  • Terminal tools
    • zsh
    • oh-my-zsh
    • zsh-syntax-highlighting
    • zsh-autosuggestions
    • neovim
    • spacevim
    • powerline font
  • GPU Monitoring tools
    • gpustat
    • glances
  • git
  • openssh

Step 3. Install Docker

./2-docker_install.sh

exact same procedure from Nvidia Docker 2 Installation Guide.

Step 4. Configure Your Environment

  1. configure bining folders, ports, etc.
.env
  1. (Optional) ssh id/password.
  • Initial root user id/password is root:root.
  • If you want to change ssh id/password, change line below in src/Dockerfile.
RUN echo 'root:root' |chpasswd
  • or, change id/password with passwd command.
  1. (Optional) base docker image.
  • If you want to change base images, change 1st line in src/Dockerfile.
FROM pytorchlightning/pytorch_lightning:base-cuda-py3.8-torch1.9

Step 5. Build and run your Docker Container

./3-docker_build.sh
./4-run_docker.sh
  • SSH to container will set automatically.

Step 6. Post Installation

1) Send public key to container.

ssh-copy-id -p 10022 root@your.ip.add.ress
  • Initial ssh id/pw is root/root.

2) ssh to docker container.

with ssh

ssh -p 10022 root@your.ip.add.ress
  • if you assign 10022 port for ssh, then you can access to your container via 10022 port from your laptop.

docker exec

docker exec -it ${CONTAINER_NAME} /usr/bin/zsh

3) Change ssh password

(inside docker container)

passwd

You have to change password.

About

License:MIT License


Languages

Language:Shell 61.7%Language:Dockerfile 38.3%