create archive when env yaml is provided in publish command #388
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Description
To create and publish in one step, one could use
ads opctl conda publishwith-f env.yamloption. In the current implementation, we execute adocker runto create conda pack and a differentdocker runto export the conda pack as conda pack archive. It is noticed that in some environments, the manifest yaml is somehow not shown up upon mounting the folders in the second docker run which causes the conda pack creation to fail.In order to prevent this situation, we can combine the conda create and archive in the same
docker runstep. Since the create API is used idependently of publish as well, we need to provide a switch to turn on or off the conda pack archive creation. This PR is for combining the create and publish step into single docker run when user provides-f env.yamlwithads opctl conda publishTesting
To run test -
CONTAINER_NETWORK=host ads opctl conda publish -n "Testing create and publish" -f test-conda/env.yaml -o -p oic://<bucket>@<namespace>/test-pack-publish/v1--verbose -d --auth security_token --oci-profile xxxxxx