Coder Social home page Coder Social logo

dockerlinreg's Introduction

Building and using a Docker Image/Container

  • This example helps you create an image that:

    • is based on Ubuntu 20.04 (It has Python 3 already installed)
    • We will update Ubuntu and install the sklearn, pandas packages on it
    • Write a Python script that receives a CSV file, perform some calculations on it and write the results into a results file (e.g. dataset.csv.out)
    • This results file should be saved into our host machine (permanent)
  • Let’s build our image (you can choose your own tag): $ docker build -t linreg .

  • and now we run the container passing it our dataset file and specifying the folder we want to the result to be stored in (using volumes): $ docker run -v /path/to/dockerfile/:/work/ linreg dataset.csv

  • This /path/to/dockerfile/ is the full path to your current directory on the host machine

  • This /work/ is the directory inside the container (the script will write the results there)

  • The dataset.csv file will be automatically passed to the script as an ENTRYPOINT argument

dockerlinreg's People

Contributors

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