How can I install missing packages?¶
Problem¶
I want to run jobs in the cloud, but some packages are missing in the provided environments. How can I install additional packages?
Solution¶
Step 1
Create a file with missing requirements, say missing_requirements.txt
:
1 2 3 4 | tqdm==4.23.0 attrdict==2.0.0 imgaug==0.2.5 pycocotools==2.0.0 |
Step 2
Now, there are two options: Command line interface or Config file.
Command line Interface
Add pip-requirements-file FILENAME
to your command:
1 2 3 4 5 6 | neptune send \ --worker s-k80 \ --environment pytorch-0.4.0-gpu-py3 \ --pip-requirements-file missing_requirements.txt \ --config neptune.yaml \ main.py |
Config file
Go to your neptune.yaml
configuration file and add a pip-requirements-file: FILENAME
section:
1 2 3 | ... pip-requirements-file: missing_requirements.txt ... |
With this line, whenever you run your script Neptune will always install requirements from this file before running your script.
Step 3
Run your script
1 2 3 4 5 | neptune send \ --worker s-k80 \ --environment pytorch-0.4.0-gpu-py3 \ --config neptune.yaml \ main.py |