Giter VIP home page Giter VIP logo

pangeo-buildx's Introduction

Pangeo buildx experiment

proof of concept using docker buildx for streamlined images without ONBUILD to simplify things and make the recipe for creating images more transparent.

goals:

  • better instruction cache (if only changing 'start' don't reinstall conda environment)
  • cache conda packages
    • if one package changes don't re-download everything
    • reuse downloaded packages from pangeo-notebook when creating ml-notebook
  • remote Dockerfile / buildcontext for different repositories?

take advantage of new Dockerfile features:

Important Dockerfile Syntax Documentation https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md

Usage:

# base-notebook
docker buildx build -f Dockerfile ./base-notebook -t base-notebook:test

# pangeo-notebook
docker buildx build -f Dockerfile ./pangeo-notebook -t pangeo-notebook:test --progress=plain

# remote dockerfile, local context
docker buildx build -f https://raw.githubusercontent.com/scottyhq/pangeo-buildx/main/Dockerfile ./base-notebook

# remote dockerfile, remote context?
docker buildx build -f https://raw.githubusercontent.com/scottyhq/pangeo-buildx/main/Dockerfile https://github.com/scottyhq/pangeo-buildx.git#main

# build everything
docker buildx bake

Pros

GitHub Actions

seems taking advantage of local volume cache not an option docker/setup-buildx-action#138 (yet)

can build a bunch of images in parallel in a single step https://github.com/docker/bake-action

Compatibility with repo2docker / binderhub

repo2docker would need to update build machinery to support buildkit (jupyterhub/repo2docker#875)

possible solutions:

  1. alternative to docker-py that supports buildkit https://github.com/gabrieldemarmiesse/python-on-whales
  2. allow-the docker-saavy to bypass repo2docker altogether (for binderhubs) and pull images directly from public registries jupyterhub/binderhub#1298. Basically just pre-build dockerfiles without repo2docker and point to them. This is effectively what https://github.com/jupyterhub/repo2docker-action is doing.

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.