Class: LearnOpen::DependencyInstallers::JupyterPipInstall

Inherits:
BaseInstaller
  • Object
show all
Defined in:
lib/learn_open/services/dependency_installers/jupyter_pip_installer.rb

Instance Attribute Summary

Attributes inherited from BaseInstaller

#environment, #io, #lesson, #location, #system_adapter

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseInstaller

call, #initialize

Constructor Details

This class inherits a constructor from LearnOpen::DependencyInstallers::BaseInstaller

Class Method Details

.detect(lesson, location) ⇒ Object



4
5
6
# File 'lib/learn_open/services/dependency_installers/jupyter_pip_installer.rb', line 4

def self.detect(lesson, location)
  File.exists?("#{lesson.to_path}/requirements.txt")
end

Instance Method Details

#runObject



8
9
10
11
# File 'lib/learn_open/services/dependency_installers/jupyter_pip_installer.rb', line 8

def run
  io.puts "Installing pip dependencies..."
  system_adapter.run_command("/opt/conda/bin/python -m pip install -r requirements.txt")
end