Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ODSC-48942]opctl create/publish error on M1 and M2 #381

Merged
merged 10 commits into from
Nov 15, 2023
Merged

[ODSC-48942]opctl create/publish error on M1 and M2 #381

merged 10 commits into from
Nov 15, 2023

Conversation

z7ye
Copy link
Contributor

@z7ye z7ye commented Oct 20, 2023

https://jira.oci.oraclecorp.com/browse/ODSC-48942

Testing Step

build the image

ads opctl build-image job-local

conda create

ads opctl conda create -n testing -f ~/Downloads/environment.yaml

conda publish

ads opctl conda publish -s /Users/z7ye/conda/testing_v1 -a security_token

Evidence

Screenshot 2023-10-23 at 3 18 45 PM Screenshot 2023-10-23 at 3 18 53 PM Screenshot 2023-10-23 at 3 19 00 PM Screenshot 2023-10-23 at 3 19 07 PM image image image

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 20, 2023
@z7ye z7ye changed the title first working version opctl create/publish error on M1 and M2 Oct 20, 2023
@github-actions
Copy link

📌 Cov diff with main:

No lines with coverage information in this diff.

📌 Overall coverage:

Coverage-71.49%

@github-actions
Copy link

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

@z7ye z7ye changed the title opctl create/publish error on M1 and M2 [ODSC-48942]opctl create/publish error on M1 and M2 Oct 24, 2023
@github-actions
Copy link

📌 Cov diff with main:

Coverage-23%

📌 Overall coverage:

Coverage-71.45%

ads/opctl/conda/cmds.py Outdated Show resolved Hide resolved
with tempfile.TemporaryDirectory() as td:
process = subprocess.Popen(
["conda", "env", "export", "--prefix", pack_folder_path],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
stdout, stderr = process.communicate()
if stderr:

if process.returncode and stderr:
print(stderr)
Copy link
Member

Choose a reason for hiding this comment

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

Let's use logger for debug purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I remember we could only use print() to show the msgs when running this code in container?

Copy link
Member

Choose a reason for hiding this comment

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

Yep yep, you are right.

Copy link
Member

Choose a reason for hiding this comment

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

NIT: Maybe Dockerfile.arm.job?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good suggestion! will change.

Copy link
Member

Choose a reason for hiding this comment

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

Just curious, the ARM docker file looks much bigger than x86 one? Was it copied from the jupyter repo?
This file I guess needs to be cleaned up. The Jobs file was much lighter in comparison with the jupyter one. We don't need to install jlab related libraries for example, and YAM i think needs to be installed differently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with Liuda's PR

Copy link
Member

Choose a reason for hiding this comment

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

Is this base yaml different from the one that we already have?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with Liuda's PR

Copy link
Member

Choose a reason for hiding this comment

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

We probably don't need this certificates if we get rid of the libraries that relay on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

Copy link
Member

Choose a reason for hiding this comment

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

Do we really need this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with Liuda's PR

Copy link
Member

Choose a reason for hiding this comment

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

We probably don't need this file, if we don't want to run the JLab server?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with Liuda's PR

Copy link
Member

Choose a reason for hiding this comment

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

We probably can get rid of this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with Liuda's PR

@github-actions
Copy link

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

@github-actions
Copy link

📌 Cov diff with main:

Coverage-23%

📌 Overall coverage:

Coverage-71.46%

@z7ye z7ye requested a review from mrDzurb October 27, 2023 17:31
@github-actions
Copy link

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

@github-actions
Copy link

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

@z7ye z7ye requested a review from liudmylaru October 27, 2023 22:17
@github-actions
Copy link

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-30.49%

@github-actions
Copy link

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-30.50%

mrDzurb
mrDzurb previously approved these changes Oct 30, 2023
ads/opctl/conda/cmds.py Outdated Show resolved Hide resolved
with tempfile.TemporaryDirectory() as td:
process = subprocess.Popen(
["conda", "env", "export", "--prefix", pack_folder_path],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
stdout, stderr = process.communicate()
if stderr:

if process.returncode and stderr:
print(stderr)
Copy link
Member

Choose a reason for hiding this comment

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

Yep yep, you are right.

@@ -161,7 +162,14 @@ def build_image(
)
proc = _build_custom_operator_image(gpu, source_folder, dst_image)
else:
image, dockerfile, target = _get_image_name_dockerfile_target(image_type, gpu)
# https://stackoverflow.com/questions/66842004/get-the-processor-type-using-python-for-apple-m1-processor-gives-me-an-intel-pro
import cpuinfo
Copy link
Member

Choose a reason for hiding this comment

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

It might be better to create a separate function - _get_architecture()? We probably will reuse this method in different other places.

Copy link

github-actions bot commented Nov 2, 2023

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

Copy link

github-actions bot commented Nov 2, 2023

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-30.49%

mrDzurb
mrDzurb previously approved these changes Nov 3, 2023
Copy link

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

@z7ye z7ye requested a review from qiuosier November 13, 2023 18:03
Copy link

📌 Cov diff with main:

No success to gather report. 😿

📌 Overall coverage:

No success to gather report. 😿

1 similar comment
Copy link

📌 Cov diff with main:

No success to gather report. 😿

📌 Overall coverage:

No success to gather report. 😿

liudmylaru
liudmylaru previously approved these changes Nov 13, 2023
WORKDIR /home/datascience

COPY base-env-arm.yaml /opt/base-env.yaml
COPY jupyter-arm.yaml /opt/jupyter.yaml
Copy link
Member

Choose a reason for hiding this comment

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

ARG PIP_INDEX_URL

############# Setup Conda environment tools ###########################
ARG RAND=1
Copy link
Member

Choose a reason for hiding this comment

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

We creating special directory for operators, setting RUN_WORKING_DIR etc., not sue if this a requirement for the image, but Dockerfile.job has this lines - https://github.com/oracle/accelerated-data-science/blob/main/ads/opctl/docker/Dockerfile.job#L108C1-L108C17
And we need to finish file with USER datascience. I would suggest to copy lines from link above to this Dockerfile also.

@@ -0,0 +1,8 @@
[ol7-yum]
name=ol7-yum
baseurl=https://artifactory.oci.oraclecorp.com/ol7-yum/
Copy link
Member

Choose a reason for hiding this comment

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

Is Artifactory in reach for users? This is not a public repository

@@ -123,6 +123,7 @@ opctl = [
"nbconvert",
"nbformat",
"oci-cli",
"py-cpuinfo",
Copy link
Member

Choose a reason for hiding this comment

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

WORKDIR /home/datascience

# Note in order to run sudo commands as a non root user, you must specify --credential yes if using qemu static to build the image
RUN wget -nv https://artifactory.oci.oraclecorp.com/odsc-dev-generic-local/datascience/Miniconda3-${MINICONDA_VER}-$(uname)-$(uname -m).sh \
Copy link
Member

Choose a reason for hiding this comment

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

We can't use here link to artifactory, this is internal resource.
Use repo.anaconda link for miniconda - https://bitbucket.oci.oraclecorp.com/projects/ODSC/repos/odsc_jobs/browse/jobs/Dockerfile.arm#73
And gihub for miniforge, like described here - https://github.com/conda-forge/miniforge#mambaforge.

Copy link

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

Copy link

📌 Cov diff with main:

Coverage-30%

📌 Overall coverage:

Coverage-71.48%

mrDzurb
mrDzurb previously approved these changes Nov 14, 2023
@z7ye z7ye dismissed stale reviews from mrDzurb and liudmylaru via 8a57a5d November 14, 2023 19:49
@z7ye z7ye requested review from mrDzurb and liudmylaru November 14, 2023 19:49
Copy link

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

Copy link

📌 Cov diff with main:

Coverage-30%

📌 Overall coverage:

Coverage-71.48%

@mrDzurb mrDzurb merged commit 34105b5 into main Nov 15, 2023
13 of 14 checks passed
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants