Skip to content

docker-compose version of sinzlab/pytorch-docker with nginx and letsencrypt

Notifications You must be signed in to change notification settings

ecomod-code/pytorch-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pytorch-docker-compose

docker-compose version of sinzlab/pytorch-docker with nginx and letsencrypt

Setup

Create a server with the most recent Ubuntu and make sure that the ports 80, 443 and 22 are open. SSH into your server, change the password and update all packages:

sudo apt update && sudo apt -y dist-upgrade # might be blocked due to auto update... just be patient

Install docker:

sudo apt -y install curl gnupg2 apt-transport-https ca-certificates  software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

sudo apt update
sudo apt -y install docker-ce

Install docker-compose

Have a look at https://github.com/docker/compose/releases and see which is the most recent release. At the time of this writing, it is version v2.4.1

sudo curl -L "https://github.com/docker/compose/releases/download/v2.4.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod a+x /usr/local/bin/docker-compose

docker-compose --version  # just checkin'

Install NVIDIA drivers

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
# reboot your machine

Install NVIDIA container runtime

curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \
  sudo apt-key add -
  
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)

curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \
  sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
  
sudo apt-get update
sudo apt-get install nvidia-container-runtime

sudo service docker restart

Clone this repository

git clone https://github.com/ecomod-code/pytorch-docker-compose.git && cd pytorch-docker-compose

Quick Start

  • create a .env file from the template cp .env-template .env
  • Edit the environment file, e.g. nano .env
    • Server_URL is the domain name of your server (e.g. my-server.uni-goettingen.de)
    • Jupyter_Password will be the password for your JupyterLab Server. Choose a strong password as your server is available from the Internet
    • your e_mail_address will be associated with the generated certificates for the encrypted connection to your server. It does not generate Spam you will just be notified when your certificate is about to expire
  • Save your changes Ctrl+O and exit the editor Strl+X
  • Run sudo docker-compose up -d to start the containers

About

docker-compose version of sinzlab/pytorch-docker with nginx and letsencrypt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published