Skip to content

Adding certain pip and/or conda packages removes pre-installed packages #1051

Closed
@deliahu

Description

@deliahu

Version

0.16, master

Steps to reproduce

1. deploy a gpu cluster (SSHing into a GPU machine and running locally should work too)

2. modify examples/pytorch/iris-classifier as follows:

update requirements.txt to be:

torch
scikit-learn

asciitree==0.3.3
gin-config==0.3.0
requests==2.23.0
tensorboard==2.2.1
tqdm==4.30.0
OpenNMT-py==1.1.1

create conda-packages.txt:

conda-forge::boto3=1.12.39=pyh9f0ad1d_0
chembl::chembl_structure_pipeline=1.0.0=py38_0
cudatoolkit=10.1.243=h6bb024c_0
cudnn=7.6.5=cuda10.1_0
conda-forge::matplotlib=3.1.3=py37_0
conda-forge::networkx=2.4=py_1
conda-forge::numpy=1.18.1=py37h8960a57_1
conda-forge::pandas=1.0.3=py37h0da4684_1
conda-forge::pathos=0.2.5=py_0
defaults::python=3.7.7=hcf32534_0_cpython
pytorch::pytorch=1.5.0=py3.7_cuda10.1.243_cudnn7.6.3_0
conda-forge::rdkit=2020.03.1=py37hdd87690_3
conda-forge::scipy=1.4.1=py37ha3d9a3c_3

update cortex.yaml to be:

- name: iris-classifier
  predictor:
    type: python
    path: predictor.py
    image: cortexlabs/python-predictor-gpu-slim:master
    config:
      model: s3://cortex-examples/pytorch/iris-classifier/weights.pth
  monitoring:
    model_type: classification
  compute:
    cpu: 3
    gpu: 1
    mem: 15G

if you are running off the 0.16 branch, replace image: cortexlabs/python-predictor-gpu-slim:master with image: cortexlabs/python-predictor-gpu-slim:0.16.0

  1. cortex deploy

  2. cortex logs iris-classifier will show this error:

ModuleNotFoundError: No module named 'uvicorn'

Additional context

It seems that all of the pre-installed cortex packages are removed or not able to be found. When appending the cortex-required packages to the requirements.txt above, the API works:

torch
scikit-learn

asciitree==0.3.3
gin-config==0.3.0
requests==2.23.0
tensorboard==2.2.1
tqdm==4.30.0
OpenNMT-py==1.1.1

boto3==1.12.31
datadog==0.35.0
dill==0.3.1.1
fastapi==0.53.0
msgpack==1.0.0
numpy==1.18.2
pyyaml==5.3.1
requests==2.23.0
uvicorn==0.11.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions