Skip to content

Improve experience when Dockerfile modifications uninstall cortex_internal package #1779

Closed
@RobertLucian

Description

@RobertLucian

Option 1

Pack installation procedures of core Cortex dependencies into a script users can easily run when building custom Docker images

Example

FROM cortexlabs/python-predictor-cpu:0.26

# run a bunch of stuff for the creation of the custom image
# in the process, the python packages get removed (i.e. due to upgrading the Python runtime)

# reinstall core Cortex dependencies
RUN /usr/local/cortex/install-core-dependencies.sh

Option 2 (could be in place of or in addition to Option 1)

At runtime, detect that the cortex_internal package has been uninstalled, and reinstall it

Additional tasks

  • Add docs for how to change the python version:
FROM quay.io/cortexlabs/python-predictor-gpu-slim:0.26.0

# update python runtime version
RUN conda install conda-forge::python=3.7
# and reinstall core cortex runtime dependencies
RUN pip --no-cache-dir install \
    -r /src/cortex/serve/serve.requirements.txt \
    /src/cortex/serve/

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions