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

Feature/update macos quickstart #1843

Closed

Conversation

aofarrel
Copy link
Contributor

@aofarrel aofarrel commented Sep 13, 2023

Description
Update Dockstore CLI install instructions, with an emphasis on updating the Mac OS instructions. Notably, we now correctly tell Mac users to use Java 17 instead of 11.

What's been tested

  • The Ubuntu instructions, because I only reformatted them, not changing any actual content
  • The "option B" instructions for Mac on an Intel-hardware Mac
  • Any new zsh alternatives to bash stuff

What has not been tested

  • The "option A" instructions for Mac, although I did fix the name of the file paths
  • The "option B" instructions for Mac on an Apple Silicon Mac -- this post from Ben implies option B might not work on Apple Silicon, but maybe the cask has been updated since then?

Specific feedback request
I listed some use cases for the Dockstore CLI after step 5, but I don't know if I "sold" it very well. Any thoughts?

Issues

Security
N/A

Please make sure that you've checked the following before submitting your pull request. Thanks!

  • Check that your code compiles by running npm run build
  • Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket. (Need feedback on this one!)
  • If this is the first time you're submitting a PR or even if you just need a refresher, consider reviewing our style guide
  • Do not bypass Angular sanitization (bypassSecurityTrustHtml, etc.), or justify why you need to do so
  • If displaying markdown, use the markdown-wrapper component, which does extra sanitization
  • Do not use cookies, although this may change in the future
  • Run npm audit and ensure you are not introducing new vulnerabilities
  • Do due diligence on new 3rd party libraries, checking for CVEs
  • Don't allow user-uploaded images to be served from the Dockstore domain
  • If this PR is for a user-facing feature, create and link a documentation ticket for this feature (usually in the same milestone as the linked issue). Style points if you create a documentation PR directly and link that instead.
  • Check whether this PR disables tests. If it legitimately needs to disable a test, create a new ticket to re-enable it in a specific milestone.

As mentioned in the previous PR, since this is an external fork, these commits might need to be cherrypicked to an internal branch to get the tests to pass.

I've made sure this compiles, but I'm not sure how/if I can authenticate locally so I can see the onboarding page, so this is a bit of a blind change. 🙈 Would appreciate someone screenshotting the resulting markdown so I can ensure our flavor of markdown renders the ##### I've introduced distinctly from ####.

aofarrel added 8 commits July 12, 2023 14:22
I tested the `brew` instructions on a fresh laptop that does not use Apple Silicon, but does use zsh. Docker 4.3.0 was chosen since that's the first version to support Apple Silicon.
Java and Docker dependencies are each now their own "part", and the two ways to install openJDK 17 have subheadings -- the combination of these two changes makes the Mac OS Java installation parts much less confusing.

Additional zsh notice made on adding dockstore CLI to the path.

Tell people their version of openJDK will vary.

Give a few use cases for the Dockstore CLI after installing the required bits, and clarify WDL doesn't require any additional downloads.

Remove some unnecessary numbering.
I tested the `brew` instructions on a fresh laptop that does not use Apple Silicon, but does use zsh. Docker 4.3.0 was chosen since that's the first version to support Apple Silicon.
Java and Docker dependencies are each now their own "part", and the two ways to install openJDK 17 have subheadings -- the combination of these two changes makes the Mac OS Java installation parts much less confusing.

Additional zsh notice made on adding dockstore CLI to the path.

Tell people their version of openJDK will vary.

Give a few use cases for the Dockstore CLI after installing the required bits, and clarify WDL doesn't require any additional downloads.

Remove some unnecessary numbering.
@denis-yuen
Copy link
Member

Build issues are probably due to this being a fork (and then branch) rather than a branch inside the ui2 repo.
Overall though, probably need someone on Mac to review

Copy link
Member

@denis-yuen denis-yuen left a comment

Choose a reason for hiding this comment

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

Pending Mac-saavy review

@aofarrel
Copy link
Contributor Author

Most recent commit changes an additional file in attempt to fix the setup/set up issue in this UI element. Reviewer please ensure that element shows as "Set Up" since I can't view the onboarding page locally. (But it does compile!)

Screenshot 2023-09-14 at 2 57 20 PM

@@ -106,73 +109,88 @@ exec newgrp docker

`;
this.textDataMacOs = `
#### Part 1a - Install Java dependencies
We'll cover two ways to install Java 11.
#### Part 1 - Install Java
Copy link
Collaborator

Choose a reason for hiding this comment

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

Radical suggestion -- let's not get into into the details of how to install Java, and just have links.

Your steps are very detailed, and yet:

  • I didn't install Java on my Mac either of the ways you list; I installed was from https://adoptium.net/, which at the time was the only Apple Silicon native JDK implementation.
  • The minor version you have, 17.0.2, is old (the 2 part), I think. While you could update it to the latest, it could probably become quickly out of date.
  • There are different ways of switching JVM versions on a Mac -- I use jenv, and I don't think we want to be too prescriptive about how to do it.
  • Instructions change with newer releases.

I think it's better not to get too detailed and let the package owners tell you how to install.

What do you think?

Copy link
Contributor Author

@aofarrel aofarrel Sep 14, 2023

Choose a reason for hiding this comment

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

There is a caveat... if we tell people to use homebrew, they have to install xCode command line tools, and that can take time. If we tell people to use OpenJDK from the archival website, they will be told on said website "hey, this is old software, don't use this!" and will end up with an older version than what homebrew would give them.

That being said: I ultimately agree with this point, and would rather direct people to just use homebrew. Installing homebrew is user-friendly, and iirc it handles the (sometimes iffy) xcode cl tools installation well. People who are developing bioinformatics tools often have it already.

Action items:

  • Does homebrew-OpenJDK work on Apple Silicon? This comment implies it might not (or at least at the time did not).
  • How long does the version of xcode that homebrew actually take to install on modern (2018-onwards-ish, intel + Apple Silicon) Macs? At what point would it be slow enough to use to say "hey, this could be slow," or does homebrew warn about this for us?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I stick by my suggestion that we just not get into how to install Java. :) I wouldn't even recommend homebrew in our doc.

To clarify, I'm not anti-Homebrew; I have it installed (on a Silicon Mac, FWIW) and use it, although I don't happen to use it to install Java. But I don't think it's Dockstore's domain to take a position on how to configure your local machine.

Copy link
Member

Choose a reason for hiding this comment

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

Could you cover this change?

Copy link
Member

Choose a reason for hiding this comment

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

re-bumping, I can't assess this

@@ -75,7 +75,7 @@ <h5>Dockstore External Services</h5>
<button mat-raised-button matStepperPrevious class="pull-right mt-2"><mat-icon>navigate_before</mat-icon>Back</button>
</mat-step>
<mat-step>
<ng-template matStepLabel>Setup Dockstore CLI</ng-template>
<ng-template matStepLabel>Set Up Dockstore CLI</ng-template>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch.

------------------------------
Set up our Dockstore CLI application in order to test workflows from the command line for [local development](${Dockstore.DOCUMENTATION_URL}/launch-with/launch.html#dockstore-cli), [validate .dockstore.yml files](${Dockstore.DOCUMENTATION_URL}/advanced-topics/dockstore-cli/yaml-command-line-validator-tool.html) for registering tools and workflows,
You can search for workflows or launch them with our cloud partners using the Dockstore website, but we also provide a command-line tool to make developing and launching workflows more convenient. Set up our Dockstore CLI application in order to test workflows from the command line for [local development](${Dockstore.DOCUMENTATION_URL}/launch-with/launch.html#dockstore-cli), [validate .dockstore.yml files](${Dockstore.DOCUMENTATION_URL}/advanced-topics/dockstore-cli/yaml-command-line-validator-tool.html) for registering tools and workflows,
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this new text, it's clear and to the point and communicates the basic concepts in a way that new users can understand.

@aofarrel aofarrel marked this pull request as ready for review September 15, 2023 23:53
@aofarrel
Copy link
Contributor Author

More notes about Apple Silicon compatibility:

As I see it, the problem isn’t with miniwdl (or cromwell) but with running a WDL that uses x86 containers on an ARM mac. Where miniwdl or cromwell comes into play is in how the WDL runtime loads the docker container that your WDL needs to run. Given that ARM macs can run x86 executables via software emulation, there should be a way to make docker (and then miniwdl/cromwell) run x86 containers on ARM macs. Or if you had docker containers that support ARM natively, that would also work.
-- Phil Shapiro, OpenWDL Slack, r/e chanzuckerberg/miniwdl#652

Other notes from that discussion:

  • Try using Docker parameter --platform=linux/amd64
  • Try setting an env variable: export DOCKER_DEFAULT_PLATFORM=linux/amd64
  • The actual Cromwell JAR works on Apple Silicon, and miniwdl likely does to (troublesome Docker images notwithstanding)

@denis-yuen
Copy link
Member

Checking in on this as part of https://ucsc-cgl.atlassian.net/browse/SEAB-6003
@coverbeck or @svonworl can someone mac-based take over this and get it over the line?

@aofarrel
Copy link
Contributor Author

Although I'm using a different machine now, I'm still using Intel hardware, so I can't test the Apple Silicon stuff. Recommend whichever reviewer has Apple Silicon hardware checks that a workflow running an x86 Docker image actually goes through.

See also:

I haven't seen issues running x86 Docker images from people running Linux on other ARM architecture; I think this is mostly a Mac issue.

Also worth keeping in mind that although the heavy hitters of Docker Hub tend to build multi-arch images, most bioinformatics Dockers images seem to be solely available in x86.

@@ -106,73 +109,88 @@ exec newgrp docker

`;
this.textDataMacOs = `
#### Part 1a - Install Java dependencies
We'll cover two ways to install Java 11.
#### Part 1 - Install Java
Copy link
Collaborator

Choose a reason for hiding this comment

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

I stick by my suggestion that we just not get into how to install Java. :) I wouldn't even recommend homebrew in our doc.

To clarify, I'm not anti-Homebrew; I have it installed (on a Silicon Mac, FWIW) and use it, although I don't happen to use it to install Java. But I don't think it's Dockstore's domain to take a position on how to configure your local machine.

@@ -106,73 +109,88 @@ exec newgrp docker

`;
this.textDataMacOs = `
#### Part 1a - Install Java dependencies
We'll cover two ways to install Java 11.
#### Part 1 - Install Java
Copy link
Member

Choose a reason for hiding this comment

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

re-bumping, I can't assess this

@coverbeck coverbeck mentioned this pull request Apr 12, 2024
11 tasks
@coverbeck
Copy link
Collaborator

Closing in favor of #1964, which is based off of this, but whose branch is in this repo which allows somebody other than Ash to respond to PR comments.

@coverbeck coverbeck closed this Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants