Git Product home page Git Product logo

docker-for-ds's Introduction

๐Ÿ‘จ๐Ÿผโ€๐Ÿ’ป docker-for-ds

A practical introduction to Docker for data scientists, showing how to use and combine Jupyter and MSSQL Server in local isolated Docker containers.

The medium post here for the longer tutorial.

๐Ÿณ Starting with Docker

  • Install Docker. This is a straightforward download from the docs.

  • Open up the app and make sure there's a green light telling you it's running.

  • Follow the hello-world tutorial to double check the installation works properly.

๐Ÿ†™ Walkthrough

We will be running two separate Docker containers:

  1. An ubuntu xenial container to run python code in Jupyter notebooks

  2. An MSSSQL Server linux container to host our database

Open a terminal in the root of the repo and run the following commands:

docker-compose build

Builds the images with docker-compose.yml acting as the configuration

docker-compose up -d

Spins up the containers

docker-compose exec app bash

Runs bash from inside the 'app' container

You will be inside the container's terminal now, run:

jupyter notebook --ip 0.0.0.0 --no-browser --allow-root

Using the provided token, enter this into your browser

http://localhost:8888/?token=URTOKEN

โœ… The token provides a security measure to make sure hackers can't access your code and data!

๐ŸŽฎ Running the notebook will extract Ninja's current Fortnite stats and load them into a fortnite table in your MSSQL instance. View your output table in a database management app. I like to use DBeaver.

How to only build the Jupyter environment

Open a terminal and navigate to /app, then run

docker build -t ds .

builds image with tag 'ds'

docker run --rm -it -p 8888:8888 ds

runs the ds image with notebook ports mapped

docker-for-ds's People

Contributors

chrisgschon 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.