21
Shane Canon NERSC Early User Training Day 2019 Running Containers at NERSC with Shifter

Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

  • Upload
    others

  • View
    25

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Shane CanonNERSC Early User Training Day 2019

Running Containers at NERSC with Shifter

Page 2: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Outline

•••

Page 3: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Intro to Containers and Shifter

Page 4: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Docker Basics

•••••

Page 5: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

What’s in an Image

•––––

•–––

•––

Page 6: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Why not just run Docker

••

> docker run -it -v /:/mnt --rm busybox

Page 7: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Shifter

••

Page 8: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Why Users will like Containers and Shifter

•••

Page 9: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Containers and Science

•––

•–

•–

Page 10: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Shifter in Action

Page 11: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Create an image with Docker

FROM ubuntu:14.04MAINTAINER Shane Canon [email protected]# Update packages and install dependenciesRUN apt-update –y && \ apt-get install -y build-essential

# Copy in the applicationADD . /myapp# Build itRUN cd /myapp && \ make && make install

Page 12: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Use the Image with Shifter

#!/bin/bash#SBATCH -N 16 -t 20 #SBATCH --image=scanon/myapp:1.1

module load shifterexport TMPDIR=/mntsrun -n 16 shifter /myapp/app

Page 13: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Shifter and MPI

••

••

Page 14: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Shifter and MPI

# This example makes use of an Ubuntu-based NERSC base image # that already has MPI built and installed.#FROM nersc/ubuntu-mpi:14.04

ADD helloworld.c /app/

RUN cd /app && mpicc helloworld.c -o /app/hello

ENV PATH=/usr/bin:/bin:/app:/usr/local/bin

srun -n 128 shifter /myapp/app

Page 15: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Shifter accelerates Python Apps

Page 16: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Shifter behavior versus Docker

••

Page 17: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Other things of Note

Page 18: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Shifter versus Spin

••

•••

Page 19: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Measuring the Composition of the Universe

•–

•–

Page 20: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Where can you learn more

•––

•–

•–

Page 21: Running Containers at NERSC with Shifter · Running Containers at NERSC with Shifter. ... Shifter. Docker Basics ... Shifter in Action. Create an image with Docker FROM ubuntu:14.04

Questions