Skip to content

DLDC (Deep Learning Docker Compose) is robust and configurable deep learning stack based on Deepo using JupyterLab

License

Notifications You must be signed in to change notification settings

eriknomitch/dldc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DLDC (Deep Learning Docker Compose)

A full Docker Compose setup for deep learning based on Deepo with separate container services for JupyterLab, Tensorboad, and nginx-proxy and persistent volumes.

Why?

Deepo is great but it's only one Docker image. This goes a step further to add a turnkey development environment using Docker Compose to create a full system.

DLDC Diagram

Requirements

DLDC is semi-opinionated.

  • An Nvidia GPU is required
  • There are no customization options for Deepo. The DLDC Docker image is based on the all- configuration of Deepo (i.e., ufoym/deepo:all-py36-jupyter) so it includes everything.
  • JupyterLab is used but classic Jupyter notebooks can be run easily from JupyterLab

Dependencies

  • docker-compose (docker-compose can now utilize GPUs with nvidia-docker2)

Usage

Quick Start

Clone the repository

$ git clone https://github.com/eriknomitch/dldc.git
$ cd dldc

Set a secure token for Jupyter lab

$ echo "JUPYTER_TOKEN='<your-token>'" >> .env

Optional: Set an external host

This is the base host you'll use so you can use subdomains for each service (i.e., http://jupyter., http://tensorboard.).

If you only plan on using this locally you can skip this.

$ echo "EXTERNAL_HOST='your-external-host.com'" >> .env

Start dldc

This will build the Docker image and start the docker-compose services fetching anything that isn't already fetched.

$ ./dldc

After launching, the docker-compose services will be running.

Configuration

Packages

You may add various types of packages to the files in config/packages/ to have DLDC build them into the Docker image.

This is especially useful because of the ephemeral nature of Docker containers. Once added here, your package will be available to any dldc docker container you run.

Important: Only add the name of the package to the corresponding file (i.e., add a line with cowsay to config/packages/apt if you want to install the apt package for cowsay).

config/
  packages/
    apt          # Package names
    jupyter      # Extension names
    jupyterlab   # Extension names
    lua          # Packae names
    pip          # Package names

After adding, re-run ./dldc.

Commands

Start dldc

$ ./dldc

If the dldc image is already built and up-to-date (i.e., nothing has changed in your personal configuration) the build will use the cache version.

Open an shell to the running DLDC jupyter service

$ ./dldc shell

Volumes

The local ./shared directory will have been created and mounted on the containers at /shared.

The Jupyter notebooks root path is ./shared locally and /shared on the container.

Relaunching

Simply run ./dldc again to start the docker-compose services.

All data in ./shared will have been preserved between instances.

[comment]: # sudo -i -u erik zsh -c "cd ~/.repositories/dldc && ./dldc up-detached"

About

DLDC (Deep Learning Docker Compose) is robust and configurable deep learning stack based on Deepo using JupyterLab

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published