Git Product home page Git Product logo

cloudera-parcel's Introduction

R-PARCEL

This repository is aim to create R parcel.

Prerequisity

You need to install Docker. I confirmed with Docker community edition on Ubuntu.

Simple way to build Parcels

After installation of Docker, run:

$ ./build.sh

You will find parcels in ./target directory.

Manual build

Preparation

Prepare R environment using miniconda.

$ mkdir -p ./target/CONDAR-3.4.1/lib
$ cp -r ./source/meta ./target/CONDAR-3.4.1/
# (Option) Modify meta/parcel.json if needed
# $ sed -i s/__OS_VERSION__/el6/g ./target/CONDAR-3.4.1/meta/parcel.json
$ docker build -t chezou/condar:centos7 -f centos7.Dockerfile .
# Open another terminal and find your container.
$ docker run -it -t chezou/condar:centos7 /bin/bash
$ docker ps
$ docker cp -L <containerId>:/opt/conda/envs/R_env ./target/CONDAR-3.4.1/lib/conda-R
# Terminate docker process

Modify meta data

In current version, you should modify version info in json.

Tar your Parcel

$ cd target
$ tar cvzf  CONDAR-3.4.1-el7.parcel CONDAR-3.4.1 --owner=root --group=root

validate, create metadata.json

I borrowed validator.jar and make_manifest.py from cm_ext repo.

How to validate json and parcel

See also: How to use validator.jar

$ java -jar lib/validator.jar <args>

At least, you should pass parcel test:

$ java -jar lib/validator.jar -f target/CONDAR-3.4.1-el7.parcel

How to create manifest.json

Run following command, then you'll get ./target/manifest.json.

$ python ./lib/make_manifest.py ./target

Put the Parcels into your http server

Upload every ./target/*.parcel and ./target/manifest.json to the same directory on http server.

You can put Parcels on S3. It doesn't need to have index.html for directory listing.

FAQ

How to control R version?

This parcel use Miniconda to install R. You can controll R version with setting r-essentials' version.

cloudera-parcel's People

Contributors

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