This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve requirements installed from Git or local source (#645)
For a package installed with `pip install git+https://...` this will pin down the URL to the package to be installed from Git. For a package installed with `pip install local/path` this will collect the package and add it as base64-encoded string to `.mlem` file. PR also adds `--build_arg` option for Docker builder to pass args at building time. TODO: - [ ] check that nothing breaks because of new fields in `requirements: ` (e.g. `source_url`) For k8s deployment this works like: ```sh $ mlem declare deployment kubernetes deployer \ --image_name myimage --service_type loadbalancer --registry remote \ --env docker --env.registry remote --registry.host localhost --namespace myns \ --build_arg.0 GITHUB_TOKEN --build_arg.1 GITHUB_USERNAME=aguschin 💾 Saving deployment to deployer.mlem ``` Note that one ARG value is set, another isn't: ```yaml $ cat deployer.mlem build_arg: - GITHUB_TOKEN - GITHUB_USERNAME=aguschin env: object_type: env registry: type: remote type: kubernetes image_name: myimage namespace: myns object_type: deployment registry: host: localhost type: remote service_type: type: loadbalancer type: kubernetes ``` Now at `mlem deploy --load deployer.mlem` MLEM will use `GITHUB_TOKEN` env var if set. If var has a different name, this can be run like ```sh $ GITHUB_TOKEN=$ENV_VAR_TO_USE mlem deploy --load deployer.mlem ``` Env var takes precedence, so if you set `GITHUB_USERNAME`, it's value will be used instead of `aguschin`.
- Loading branch information
Showing
9 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters