-
Notifications
You must be signed in to change notification settings - Fork 1
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
Create a Docker image for topic generator #505
Conversation
Dockerfile
Outdated
RUN apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y --no-install-recommends | ||
COPY topicgenerator/target/topicgenerator*[^s].jar /home |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we could add other JARs from this repo in there, but the metrics aggregator and github delivery both require s3 permissions and documented to be run on the deployer, where, AFAIK, we don't have Docker installed. So for now, I'm only doing this one, but we could more in the future.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #505 +/- ##
=============================================
+ Coverage 15.91% 19.47% +3.56%
- Complexity 154 178 +24
=============================================
Files 57 57
Lines 2897 2901 +4
Branches 228 228
=============================================
+ Hits 461 565 +104
+ Misses 2400 2297 -103
- Partials 36 39 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
5ad260d
to
7a4d732
Compare
cd /home | ||
|
||
echo "Creating a CSV file of AI topic candidates from Dockstore" | ||
java -jar $APP_JAR -c $CONFIG get-topic-candidates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command doesn't exist yet, it's in PR #504.
a686116
to
ee11fd3
Compare
CLAUDE_3_5_SONNET("anthropic.claude-3-5-sonnet-20240620-v1:0", 0.003, 0.015, 200000), | ||
CLAUDE_3_HAIKU("anthropic.claude-3-haiku-20240307-v1:0", 0.00025, 0.00125, 200000), | ||
CLAUDE_3_5_SONNET("us.anthropic.claude-3-5-sonnet-20240620-v1:0", 0.003, 0.015, 200000), | ||
CLAUDE_3_HAIKU("us.anthropic.claude-3-haiku-20240307-v1:0", 0.00025, 0.00125, 200000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed to change these to be cross-region inferences, so QA would work.
52fb5fa
to
d3c477a
Compare
final String mainScriptPath = NextflowUtilities.grabConfig(nextflowConfigFileContent).getString("manifest.mainScript", "main.nf"); | ||
final String mainScriptPath; | ||
try { | ||
mainScriptPath = NextflowUtilities.grabConfig(nextflowConfigFileContent).getString("manifest.mainScript", "main.nf"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First time I ran this, I believe I got a NextflowParsingException, which caused the program to exit early. Put this in a try catch.
Kathy thinks that it may have just been logging noise that I saw, so I could be wrong. But the method can throw a NextFlowParsingException, so we should catch it anyway.
|
||
cd /home | ||
|
||
echo "Generating topics for all AI topic candidates from Dockstore" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"for all AI topic candidates" -> for 500
RUN apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y --no-install-recommends | ||
COPY topicgenerator/target/topicgenerator*[^s].jar /home/topic-generator.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the [^s]
do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a build, there are 2 JARs in the target directory:
topicgenerator-1.16.0-SNAPSHOT-sources.jar
topicgenerator-1.16.0-SNAPSHOT.jar
The [^s]
is what I came up with to skip the sources JAR.
Added two additional things to this PR:
Re-requesting reviews |
Quality Gate passedIssues Measures |
echo "S3_FOLDER=${S3_FOLDER}-$(echo $GITHUB_SHA | cut -c -7)" >> $GITHUB_ENV | ||
|
||
# neat, quay itself uses manual github actions https://github.com/quay/quay/blob/master/.github/workflows/build-and-publish.yaml | ||
- if: github.ref == 'refs/heads/develop' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point in the future, especially if we end up creating additional Docker images, we might want to consider moving this code to dockstore/workflows. But looks good now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, I noticed we create images and upload checksums for images in dockstore/dockstore and dockstore-deploy as well, so it'll be good to create a re-usable workflow. I'll create a ticket for this or maybe this can be tackled when we implement uploading the image digest for this image
I can't approve this because I'm still the assignee -- not sure if that's intentional or not, so signaling my approval here. |
Description
Creates a Docker image for the topic generator. We'll use that image for the scheduled task in Fargate.
Depends on companion workflow-actions PR
Review Instructions
See review steps in dockstore/workflow-actions#2
Issue
SEAB-6653
Security
If there are any concerns that require extra attention from the security team, highlight them here.
Please make sure that you've checked the following before submitting your pull request. Thanks!
mvn clean install
in the project that you have modified (until https://ucsc-cgl.atlassian.net/browse/SEAB-5300 adds multi-module support properly)