Coder Social home page Coder Social logo

sanjeevphd / docker4modernml Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 49 KB

A modern approach to data science and machine learning using Python & Docker.

Home Page: https://sanjeevphd.github.io/Docker4ModernML/

Dockerfile 40.26% Makefile 25.65% Python 12.66% Shell 21.43%
docker dockerfile jupyterlab makefile python

docker4modernml's Introduction

Modern Machine Learning with Python and Docker

A modern approach to data science and machine learning using Python & Docker.

Goals

  • Use a modern Python development stack geared towards automation and best practices.
  • Harness Docker for a reproducible, portable development environment and ease transition to production.

Requirements

  • Docker
  • Bonus: GNU make to make full use of the Makefile

Note: This has only been tested on macOS. Linux support is assumed. Windows support is untested.

Usage

Basic usage

make docker-run

Automatically pulls the latest image from Docker Hub the first time it is run. Subsequent runs will use local copy and will be faster. Copy the link to the Jupyter Lab server and paste it into a browser of your choice to access the Jupyter Lab.

By default, the current working directory $PWD will be used as the local directory that will be mapped to /root/work directory on the Docker container.

Specify Folder

make docker-run host_volume=/full/path/to/local/folder

Use the host_volume option to specify the local folder to be used by the Docker container. The specified folder will be available under /root/work in the Docker container.

Build Docker Image

make docker-build

Push Docker Image to Docker Hub

This step requires creating an account and a repository on Docker Hub (free for public images). Update the docker_hub_repo` variable in Makefile to point to the correct repo on Docker Hub.

make docker-push

Features

  • Uses pyenv for managing Python version
  • Uses Python Development Master (pdm) for managing dependencies and packaging
  • Uses Cookiecutter for project scaffolding
  • Keeps the common packages and libraries related to Python development and DS/ML projects in a global space to avoid reinstalling for every project
  • Keeps a local copy of the cookiecutter project template in the final image
  • Aims for a small final image (work in progress).

Installed Packages

Python Development

  • cookiecutter
  • nox
  • pre-commit
  • flake8
  • sphinx
  • sphinx-click
  • furo
  • black
  • pytest
  • coverage
  • typer
  • mypy

Basic Python data science packages

  • ipython
  • jupyterlab
  • numpy
  • scipy
  • matplotlib
  • pandas
  • seaborn
  • statsmodels

docker4modernml's People

Contributors

sanjeevphd avatar

Watchers

 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.