GithubHelp home page GithubHelp logo

mortiniera / hogwild-spark Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 353 KB

Implement Parallel synchronous and asynchronous versions of SGD in Spark on Kubernetes for learning support-vector machines.

Dockerfile 7.41% Shell 41.98% Python 50.61%

hogwild-spark's Introduction

Hogwild spark

Authors

  • Timoté Vaucher
  • Patrik Wagner
  • Thevie Mortiniera

Setup

We suppose one have a version of Spark including Hadoop , Anaconda, Docker, Kubernetes (i.e. kubectl) installed on your computer

Set up the environment

conda create -n hogwild-spark python=3.7 scipy numpy pyspark
source activate hogwild-spark

Build the image

You first need to set the env var SPARK_HOME and update the spark_home arg in the Dockerfile in order to be able to build the image. If you want to change the name of the image, this can be done in docker-image-tool.sh

Then to build and push the image :

bash docker-image-tool.sh -t tag build
bash docker-image-tool.sh -t tag push

note : numpy and scipy take a long time to build the first time you create the image

Run the app

You first need to update the GROUP_NAME and IMAGE in run.sh

Then to run the app (-w for the number of executor)

bash run.sh -w 4

Alternatively one can combine the 2 steps (build / call) by using the additional args

bash run.sh -w 4 -t tag -n AppName -b

Get the logs

The simplest way to access the logs stored on the container is to create another pod and then use kubectl cp

kubectl create -f helper/shell.yml
kubectl cp shell-pod:/data/logs path/to/your/logs

Access a bash

To see a bash and inspect the \data folder on can use the above pod by calling kubectl attach -t -i shell-pod (this also allows you to delete old logs if necessary)

hogwild-spark's People

Stargazers

 avatar

Watchers

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