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

Print image build info when image is called without arguments and log base image info at cab startup #652

Open
o-smirnov opened this issue Jun 25, 2020 · 7 comments
Assignees
Milestone

Comments

@o-smirnov
Copy link
Collaborator

Suddenly getting this:

2020-06-25 19:44:14 CARACal.Stimela.elevation-plots-ms0 INFO: job started at 2020-06-25 19:44:14.461771
# Unable to find image 'stimela/owlcat:1.2.6' locally
# 1.2.6: Pulling from stimela/owlcat
# 5b7339215d1d: Already exists
# 14ca88e9f672: Already exists
# a31c3b1caad4: Already exists
# b054a26005b7: Already exists
# e34c08aa042a: Already exists
# fa99466bac05: Already exists
# 202f3ef50fc0: Already exists
# a1c8c7c71a57: Already exists
# 595b6c56bbbd: Already exists
# cb43af8501e9: Already exists
# 96bc011cfd76: Already exists
# f54618049cbd: Already exists
# fea18820a857: Already exists
# a72e51d06413: Already exists
# 05d9e2e66e72: Already exists
# f548e5b87fa4: Already exists
# 3e345390b871: Already exists
# ac632e8f9e9c: Already exists
# 6d95ccf970b2: Already exists
# 7c8066b41845: Pulling fs layer
# a74fb5628f11: Pulling fs layer
# 99c668bfeb92: Pulling fs layer
# 99c668bfeb92: Verifying Checksum
# 99c668bfeb92: Download complete
# 7c8066b41845: Verifying Checksum
# 7c8066b41845: Download complete
# 7c8066b41845: Pull complete
# a74fb5628f11: Verifying Checksum
# a74fb5628f11: Download complete
# a74fb5628f11: Pull complete
# 99c668bfeb92: Pull complete
# Digest: sha256:7318e8fb29a246da754927c41bd6596c2d5bff610c17b42b37d0487a293e61e8
# Status: Downloaded newer image for stimela/owlcat:1.2.6
# 4ec0c9f7826a7512b5c1d42ca74563b335e06ff60313d243e6b95fce5cc44275
#   File "/stimela_mount/code/run.py", line 1
# SyntaxError: encoding problem: future_fstrings
2020-06-25 19:44:47 CARACal.Stimela.elevation-plots-ms0 ERROR: docker returns error code 1

Guessing it needs to be rebuilt with fstrings pip installed?

@o-smirnov
Copy link
Collaborator Author

@SpheMakh help! I can't fix this because when I try to rebuild, stimela/base:1.6.0 is missing. Looks like you forgot to upload it to the dockerhub.

@SpheMakh SpheMakh added the bug label Jun 25, 2020
@SpheMakh
Copy link
Collaborator

oh no! on it

@SpheMakh
Copy link
Collaborator

The base image is indeed missing from dockerhub, but your cab seems to be using an outdated owlcat_ploelev base image. The error should go away if you install the master branch or release 1.6.4 (these are the same ATM)

The base should have tag 1.6.4 (version 1.6.3)

https://github.com/ratt-ru/Stimela/blob/e370ed9da9ca8893ce67362979fae0736e2b66c4/stimela/cargo/cab/owlcat_plotelev/parameters.json#L2-L5

and not 1.2.6 as below

# Unable to find image 'stimela/owlcat:1.2.6' locally
# 1.2.6: Pulling from stimela/owlcat

@o-smirnov
Copy link
Collaborator Author

Ah yes, I had 1.2.6 set in my general: cabs section, because this was the test image I had built for my owlcat updates (while stimela master sat at 1.2.5). Dunno why it stopped working, maybe you built and pushed a different 1.2.6 at some point?

I feel this whole image tagging business needs some restructuring, it's impossible to keep track of who built what where from what and why. I'll open an issue with a proposal...

@SpheMakh
Copy link
Collaborator

Please add the R2.0 milestone to your proposal

@o-smirnov
Copy link
Collaborator Author

BTW, do you override the entrypoint when you run the container?

I was thinking that a default image entrypoint that simply echoed something like "stimela/owlcat:1.6.4 built by [email protected] on date XXX Stimela version YYY sha ZZZ" would make identification easier. And printing the same line when the container starts, so it's visible in the caracal log. More useful than the infinitely long hex container ID, anyway.

The same info could be added as labels to the image.

Of course this means there would have to be a script to automate docker build, can't just do all that by hand.

@SpheMakh
Copy link
Collaborator

BTW, do you override the entrypoint when you run the container?

Nope, I leave the entrypoint as the default.

I was thinking that a default image entrypoint that simply echoed something like "stimela/owlcat:1.6.4 built by [email protected] on date XXX Stimela version YYY sha ZZZ" would make identification easier. And printing the same line when the container starts, so it's visible in the caracal log. More useful than the infinitely long hex container ID, anyway.

I think it's better to leave the entrypoint as is, but set the CMD to print the message. And definitely print it when running the container

The same info could be added as labels to the image.

Agreed

Of course this means there would have to be a script to automate docker build, can't just do all that by hand.

@SpheMakh SpheMakh changed the title owlcat_plotelev cab broken on future-fstrings Print image build info when image is called without arguments and log base image info at cab startup Jun 26, 2020
@SpheMakh SpheMakh added this to the R2.0 milestone Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants