How do I bootstrap packages available only within pip for running on Batch
See original GitHub issueRunning on AWS I would usually define a step:
@batch(cpu=1, memory=5000)
@conda(libraries={'pandas': '1'})
@step
def hello(self):
do stuff...
However, I am working with deeplearning libraries (MXnet/tensorflow/pytorch), and they are not particularly up to date on conda and it is best to install with pip.
How do I define pip dependancies for this step?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Using Python's pip to Manage Your Projects' Dependencies
In this example, you run pip with the install command followed by the name of the package that you want to install. The...
Read more >How to Install Pip on Windows - ActiveState
Click on the Advanced system settings link on the left panel; Click Environment Variables; Under System Variables, double-click the variable ...
Read more >'pip' is not recognized - python - Stack Overflow
'pip' is not recognized ; run windows cmd, go to your python script dir (example cd C:\Python27\Scripts) then run pip. – ssnake. Apr...
Read more >Add support for plain pip package installation (similar to Conda)
How do I bootstrap packages available only within pip for running on Batch #395. Open. sappier pushed a commit to sappier/metaflow that ...
Read more >How to Install PIP on Windows: A Simple Guide with ...
In more practical terms, PIP is a widely used package-management system designed to install libraries that aren't included in the standard ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks, this solved it! I didn’t see the topic. I was looking at the docs, and I used the command there:
os.system('pip install my_package')
, which was invoking the wrongpython
interpreter in the container. Didn’t occur to me to usesys.executable
.Are there plans to integrate this to have something like this instead:
@conda(libraries={...}, pip={...})
so that pip libraries can be cached along with the conda libraries in s3?
@dibgerge There is some discussion on that topic in #24. You can install your pip packages in your step by executing -
subprocess.run([sys.executable, '-m', 'pip', 'install', '--quiet', ...])
.