Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing and configuring different versions of R. #2

Open
grabear opened this issue Oct 10, 2018 · 10 comments
Open

Installing and configuring different versions of R. #2

grabear opened this issue Oct 10, 2018 · 10 comments

Comments

@grabear
Copy link
Member

grabear commented Oct 10, 2018

From @grabear on May 8, 2018 3:49

https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installation

Copied from original issue: datasnakes/beRi#13

@grabear
Copy link
Member Author

grabear commented Jan 2, 2019

I just found this on GitHub. @sdhutchins
https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/r/package.py

@sdhutchins
Copy link
Member

sdhutchins commented Jan 2, 2019

Nice! I starred this earlier and I never even considered how it could be used for this package. Glad you posted that here. My initial thought was using it for our server 😔 or on the MCSR.

Related, check out www.numfocus.org.

I was writing up an email (I had to leave 😢) about the grants that NumFocua funds. They seem to be pretty open proposals and I think the nature of beri would be perfect for it (it's built in python and helps tackle data science). I saw spack and some other cool stuff on their site.

@sdhutchins
Copy link
Member

A bit more about spack...

To install R, it's as simple as the below...

spack install [email protected]

The installation location can be edited as well...(https://spack.readthedocs.io/en/latest/config_yaml.html?highlight=install%20location) in spack's config.yaml

config:
  # This is the path to the root of the Spack install tree.
  # You can use $spack here to refer to the root of the spack instance.
  install_tree: $spack/opt/spack


  # Locations where templates should be found
  template_dirs:
    - $spack/share/spack/templates


  # Default directory layout
  install_path_scheme: "${ARCHITECTURE}/${COMPILERNAME}-${COMPILERVER}/${PACKAGE}-${VERSION}-${HASH}"


  # Locations where different types of modules should be installed.
  module_roots:
    tcl:    $spack/share/spack/modules
    lmod:   $spack/share/spack/lmod
    dotkit: $spack/share/spack/dotkit

Ultimately, we need to test out spack on a server to get a better feel for it.

  • Using spack's api to create a thin wrapper around their R installation script.
  • Decide if there are additional R packages we want to include in the base R installation.

@grabear
Copy link
Member Author

grabear commented Jan 10, 2019

Can you use a named config file? Like rinse.yml instead of config.yml?

Or can you use a python dictionary for config?

@sdhutchins
Copy link
Member

Can you use a named config file? Like rinse.yml instead of config.yml?

Or can you use a python dictionary for config?

I think a rinse.yml file is a great idea. Thinking more on that...we could make it "shareable"? for people who want to replicate a build on more than one machine. Not a priority, but something I thought of.

@sdhutchins
Copy link
Member

sdhutchins commented Feb 24, 2019

  • Create a rinse.yml for configuring rinse and namely spack.

@sdhutchins
Copy link
Member

@vghorakavi

Here's my thought process on a shell class for spack. Feel free to chime in or start developing it.

#!/usr/bin/env spack-python
# -*- coding: utf-8 -*-
import spack


class Spack:
    
    def __init__(self):
        self.spack_binary = ""
        pass
    
    def __check_for_spack(self):
        """Check to see if spack is in the path i.e. already in use.
        
        Perhaps this function also prompts user to elect to use the existing
        install or not.
        """
        pass
    
    def __install_spack(self):
        """Install spack if the user elects to use spack to manager R.
        
        Spack would be installed in the .rinse/bin. Install using github? api?
        Or just a link and wget. Maybe fork it.
        #TODO
        """
        pass
    
    def list_r_versions(self):
        """List available versions of R that can be installed."""
        pass
    
    def install_r(version, path):
        """Install R using spack.
        
        Use subprocess.Popen to call the spack binary. 
        May be useful to package spack within rinse instead of modifying
        the user's path. Ultimately, spack will be in the bin so getting that
        path won't be hard.
        """
        pass

@sdhutchins
Copy link
Member

@grabear are you still wanting to integrate spack with this?

@grabear
Copy link
Member Author

grabear commented Mar 26, 2019

Yea! I set up my src_install branch so that spack would be easy to integrate

@sdhutchins
Copy link
Member

@grabear perfect. I don't know how to quote with fasthub...lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants