New "split" docker image architecture

This document outlines the new “split” architecture used in v1 of the repo.

Feedback welcome.

Goals:

  1. Faster / easier development
  2. Quicker builds / deployments

New image divisions:

  1. gadicc/diffusers-api-base

    Conda environments (Python, Pytorch, CUDA, xformers) take a while to setup (download, dependency solving) so I’ve moved this to its owner container. Available tags:

    • docker pull gadicc/diffusers-api-base:python3.9-pytorch1.12.1-cuda11.6-xformers
    • in the future: an arm variant that can work with Apple silicon.
  • gadicc/diffusers-api

    This will be the new main image. It will default to RUNTIME_DOWNLOADS=1, and can be run instantly straight from Docker, downloading what it needs at runtime. Much quicker to build and rebuild, as no baked in model… it basically installs all necessary python packages, diffusers, and has the docker-diffusers-api wrapper code.

  • GitHub - kiri-art/docker-diffusers-api-build-download: Builds diffusers-api with a pre-downloaded model

    This is a small wrapper over the above that:

    1. Sets any necessary ENV vars via build-args
    2. Downloads the model at build time and stores in the image.

    There’s also a runpod variant of the above tailored for RunPod’s Serverless AI offering.

I think this will be a big help for anyone wanting to be more involved with development, play locally, and people wanting more deployment options.

1 Like

is gadicc/diffusers-api image includes latest update of optimization?

Yes. It’s what I’m using for kiri.art. However, it’s not an official release yet :sweat_smile: But clearly does work (at least for however I’m using it).

And see also:

if those aren’t what you’re already using. They’re also not official releases (yet) but worked for me at least (on kiri.art, provider 1 (banana), it’s in use for the sdv2-1 models, and tested on runpod but not used for kiri.art).