* added testing
* github action for python, made mypy happy
* formatted with black
* minor fixes and styling
* test model cache
* cache test dependencies
* narrowed model cache tests
* moved endpoint tests to their own class
* cleaned up fixtures
* formatting
* removed unused dep
* basic refactor and styling
* removed batching
* module entrypoint
* removed unused imports
* model superclass, model cache now in app state
* fixed cache dir and enforced abstract method
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* using pydantic BaseSetting
* ML API takes image file as input
* keeping image in memory
* reducing duplicate code
* using bytes instead of UploadFile & other small code improvements
* removed form-multipart, using HTTP body
* format code
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
Manifest list digests can be found with:
```sh
docker buildx imagetools inspect python:3.11.4-bullseye
docker buildx imagetools inspect python:3.11.4-slim-bullseye
docker buildx imagetools inspect ghcr.io/nginxinc/nginx-unprivileged:1.25.0-alpine3.17
```
The node images are pinned in #2736Fixes#2751
Partially fixes#2752
* updated dockerfile, added typing, packaging
apply env change
* added arm64 support
* added ml version pump, second try for arm64
* added linting config to pyproject.toml
* renamed ml input field
* fixed linter config
* fixed dev docker compose
* env variables for tags, faces and eager startup
* chore(server,ml): remove object detection job and endpoint (#2627)
* removed object detection job
* removed object detection endpoint
* env variables for tags, faces and eager startup
* download without caching models if not eager
* simplified `get_cached_model`
* re-added env for clip text model
* default NODE_ENV to production for server image
* update node image to use 3.17 alpine in server
* update web docker image to use alpine 3.17
* remove NODE_ENV from production docker-compose
* NODE_ENV is also needed default in machine-learning
* Use multi stage build to slim down ML image size
* Use gunicorn as WSGI server in ML image
* Configure gunicorn server for ML use case
* Use requirements.txt file to install python dependencies in ML image
* Make ML listen IP configurable
* Revert "Use requirements.txt file to install python dependencies in ML image"
This reverts commit 32e706c7f3.
* Separate out pip installs in ML builder image
* Use multi stage build to slim down ML image size
* Use gunicorn as WSGI server in ML image
* Configure gunicorn server for ML use case
* Use requirements.txt file to install python dependencies in ML image
* Make ML listen IP configurable
* Install nightly release of pytorch to enable ML support for arm CPUs
* Remove linux/arm/v7 from ML docker builds
* Add --no-cache-dir to torch installation command in ML image build
* Use PIP_NO_CACHE_DIR option in ML build to further decrease image size
* fix(machine-learning): Add the command to execute at startup
Previously it wasn't set in the Docker container but it should be.
* fix(docker): remove machine-learning command arg
* fix(docker): machine-learning CMD argument
BREAKING CHANGES
* Users have to update the docker-compose file, machine-learning portion.
* Temporary dropping machine-learning support for Arm64 and Armv7