case_studies/micromanage/lib/mmlib/v0.1.2/cmd/pip.libsonnet
raw| 1 | { |
| 2 | // A mixin on top of an image or instance that allows high level installation of pip packages. |
| 3 | Mixin:: { |
| 4 | |
| 5 | // Add pip packages here. |
| 6 | pipPackages:: [], |
| 7 | |
| 8 | cmds+: |
| 9 | if std.length(self.pipPackages) == 0 then |
| 10 | [] |
| 11 | else |
| 12 | ['pip install ' + std.join(' ', self.pipPackages)], |
| 13 | }, |
| 14 | |
| 15 | } |