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

How to get rid of the progress bar when pushing images #156

Closed
prudhomm opened this issue Oct 10, 2018 · 12 comments
Closed

How to get rid of the progress bar when pushing images #156

prudhomm opened this issue Oct 10, 2018 · 12 comments

Comments

@prudhomm
Copy link

Is it possible to remove/disable the progress bar when pushing from a CI script? It may generate otherwise a (very) large logfile depending on the size of the singularity image.

here is the command line I use:

singularity run -B /mnt $HOME/singularity/sregistry.simg push --name ${SIMG_MSO4SC_REGISTRY_NAME} --tag ${SIMG_MSO4SC_REGISTRY_TAG} ${SIMG_DIR}/${SIMG}\

the $HOME/singularity/sregistry.simg is an image provided by CESGA(@victorsndvg) to upload our images on their sregistry

Our images reach up to 4.2GB (hence the big log file).

@vsoch
Copy link
Member

vsoch commented Oct 10, 2018

Hey @prudhomm this is a very good point! The issue belongs with the client (and I created it for you) and it should be the case that the progress bar is linked to the robot debugger logging level (I believe it's not). I'll put in a PR soon and then ping you to test. Stay tuned!

@vsoch
Copy link
Member

vsoch commented Oct 10, 2018

okay I have something underway but I need to run out - I'll have a PR for you to look at later this afternoon. Thanks!

@vsoch
Copy link
Member

vsoch commented Oct 10, 2018

hey @prudhomm I have a branch here with a fix --> singularityhub/sregistry-cli#152 Could you please test with "push" ? I don't have a registry running here so I was only able to test with pull. Let me know if something needs fixing/changing. Thanks!

@victorsndvg
Copy link
Contributor

I've tested it and it works as expected. Thanks @vsoch !

Remember that you have credentials to use our sregistry for your tests! :)

@prudhomm , I've pushed this image as the latest sregistry at MSO4SC container registry

@victorsndvg
Copy link
Contributor

I've found an issue when the --quiet flag is not present:

$ singularity run -B /mnt mso4sc-sregistry-latest.simg pull hifimagnet/salome:8.5.0
[client|registry] [database|sqlite:////home/sandman/.singularity/sregistry.db]
Traceback (most recent call last):
  File "/usr/local/bin/sregistry", line 11, in <module>
    load_entry_point('sregistry', 'console_scripts', 'sregistry')()
  File "/usr/local/lib/sregistry-cli/sregistry/client/__init__.py", line 379, in main
    subparser=subparsers[args.command])
  File "/usr/local/lib/sregistry-cli/sregistry/client/pull.py", line 51, in main
    save=do_save)
  File "/usr/local/lib/sregistry-cli/sregistry/main/registry/pull.py", line 104, in pull
    show_progress=not self.quiet)
  File "/usr/local/lib/sregistry-cli/sregistry/main/base/http.py", line 194, in download
    show_progress=show_progress)
  File "/usr/local/lib/sregistry-cli/sregistry/main/base/http.py", line 252, in stream
    show_progress=show_progress)
  File "/usr/local/lib/sregistry-cli/sregistry/main/base/http.py", line 285, in stream_response
    bot.show_progress(progress, content_size, length=35)
  File "/usr/local/lib/sregistry-cli/sregistry/logger/message.py", line 192, in show_progress
    if not self.quiet:
AttributeError: 'SRegistryMessage' object has no attribute 'quiet'

It has sense for you?

@vsoch
Copy link
Member

vsoch commented Oct 11, 2018

yep let me fix that.

@vsoch
Copy link
Member

vsoch commented Oct 11, 2018

Please test --> singularityhub/sregistry-cli#153 I also updated recipe to use vault 2.6... although fingers crossed that exists :)

@victorsndvg
Copy link
Contributor

@vsoch , now the progress bar is not shown also without --quiet flag

@vsoch
Copy link
Member

vsoch commented Oct 12, 2018

Now?

@vsoch
Copy link
Member

vsoch commented Oct 12, 2018

lol wait I think I reversed it :)

@vsoch
Copy link
Member

vsoch commented Oct 12, 2018

ok try now :)

@vsoch
Copy link
Member

vsoch commented Oct 12, 2019

@prudhomm I'm going to close the issue as it's gone stale, and also you should check out #240 as it's adding push via the Singularity software proper, and there might be more options for silencing stdout/stderr there.

@vsoch vsoch closed this as completed Oct 12, 2019
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

No branches or pull requests

3 participants