Skip to content

Vision Service: Optimize Docker container image #6

Open
@sgflt

Description

@sgflt

Description

  1. Currently are application files located in lower layer. It means each change of python code will cause to reinitialize whole venv (~5GiB). We can reorder layers to more optimal ordering. Also we can create minimal image without installing dependencies and offload instalation to first startup time. Can we?
  2. There is some preparation of GO/RUST environment. Is it needed?
  3. Flask development server should be replaced by gunicorn

Pull Request

This PR reduces size produced image and introduces lazy initialization:

It includes the following changes:

  • Layers are ordered from the layer that changes the least to the alyer that is changed almost in every build.
  • Dockerfile now contains volumes as suggestion where to mount folders from host, because they will be really big.
  • Set gunicorn as production grade server instead of flask development server.

Acceptance Criteria

  • New features or enhancements are fully implemented and do not break existing functionality, so that they can be released at any time without requiring additional work
  • Documentation has been / will be updated, especially as it relates to new configuration options or potentially disruptive changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    dockerDocker image or configuration exampleshelp wantedHelp with this would be much appreciated!

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions