Skip to content

Conversation

@mayoor
Copy link
Member

@mayoor mayoor commented Oct 26, 2023

Description

To create and publish in one step, one could use ads opctl conda publish with -f env.yaml option. In the current implementation, we execute a docker run to create conda pack and a different docker run to 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 run step. 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.yaml with ads opctl conda publish

Testing

To run test -

  • Create a conda env.yaml with following contents -
channels: - defaults - conda-forge dependencies: - main::scikit-learn - main::pip - pip: - oracle-ads[geo,notebook,text] 
  • Run 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

image

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 26, 2023
@github-actions
Copy link

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-30.50%

@github-actions
Copy link

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-30.51%

@mayoor mayoor requested review from liudmylaru and mrDzurb October 26, 2023 22:20
@github-actions
Copy link

📌 Cov diff with main:

Coverage-56%

📌 Overall coverage:

Coverage-71.45%

@mayoor mayoor marked this pull request as ready for review October 27, 2023 15:55
mrDzurb
mrDzurb previously approved these changes Oct 27, 2023
raise RuntimeError(
"Error creating the pack file using `conda_pack.pack()`."
)
print(f"Copy {pack_file} to {pack_folder_path}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we use logger instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside pack.py there is no logger so far. This runs inside the container.

liudmylaru
liudmylaru previously approved these changes Oct 27, 2023
@mayoor mayoor dismissed stale reviews from liudmylaru and mrDzurb via 8555deb October 27, 2023 18:34
@github-actions
Copy link

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-30.51%

@mayoor mayoor merged commit f1cb80c into main Oct 27, 2023
@mayoor mayoor deleted the ODSC-49218/create_archive_publish branch October 27, 2023 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

3 participants