Giter VIP home page Giter VIP logo

mlind-infn's Introduction

INFN MLinDocker

Configure the host machine

The following instructions are valid for an Ubuntu OS.

Install NVIDIA driver

T4 GPU is taken as an example:

apt update
apt upgrade -y
apt install -y gcc make
wget https://us.download.nvidia.com/tesla/450.80.02/NVIDIA-Linux-x86_64-450.80.02.run
chmod +x NVIDIA-Linux-x86_64-450.80.02.run

Now you are ready to proceed with the interactive installation:

./NVIDIA-Linux-x86_64-450.80.02.run

Install Docker

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    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"
apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io

Include also docker-compose:

sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

Install NVIDIA-Docker

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)    && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -    && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
apt-get update
sudo apt-get install -y nvidia-docker2
systemctl restart docker

Test your GPU setup

Check that all your GPUs are visible with:

docker run --rm --gpus all nvidia/cuda nvidia-smi

Bringup JupyterHUB with OAuth authentication

Download this repo:

git clone https://github.com/dodas-ts/MLinD-INFN
cd MLinD-INFN

Compile the docker-compose.yaml file with your preferences:

version: '3.7'
services:
  jupyterhub:
    build: .
    command:
      - /opt/conda/bin/python
      - /opt/conda/bin/jupyterhub
      - --debug
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock
    ports:
    - 8888:8888
    environment:
    - OAUTH_ENDPOINT=https://iam.cloud.infn.it
    - OAUTH_CALLBACK_URL=http://<HERE pub ip of the server>:8888/hub/oauth_callback
    - OAUTH_GROUPS=group1 group2
    - WITH_GPU=true

networks:
  default:
    name: jupyterhub

Bring up your hub server with:

docker-compose up -d

Reach out for the hub

You should be able to login at http://<yourIP>:8888/hub

mlind-infn's People

Contributors

dciangot avatar caifti avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.