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

Trying GUI version produces error regarding protobuf #533

Open
gsaxena888 opened this issue Jan 4, 2023 · 3 comments
Open

Trying GUI version produces error regarding protobuf #533

gsaxena888 opened this issue Jan 4, 2023 · 3 comments

Comments

@gsaxena888
Copy link

On a docker running Debian, I tried to run AlphaPept GUI, but I got this error message. Thoughts? Also, is there any plan to maybe have a docker version so that we can quickly try things out?

root@00c3c7d17588:~# alphapept gui

     ___    __      __          ____             __ 
    /   |  / /___  / /_  ____  / __ \___  ____  / /_
   / /| | / / __ \/ __ \/ __ \/ /_/ / _ \/ __ \/ __/
  / ___ |/ / /_/ / / / / /_/ / ____/ ___/ /_/ / /_  
 /_/  |_/_/ .___/_/ /_/\__,_/_/    \___/ .___/\__/  
         /_/                          /_/           
....................................................
.      https://github.com/MannLabs/alphapept       .
.                    Mann Labs                     .
.                      0.4.9                       .
....................................................


Starting AlphaPept Background Process

An exception occured running AlphaPept version 0.4.9:

....................................................

cannot import name 'builder' from 'google.protobuf.internal' (/usr/local/lib/python3.8/site-packages/google/protobuf/internal/__init__.py)

ERROR:root:Traceback
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/alphapept/__main__.py", line 12, in main
    alphapept.interface.run_cli()
  File "/usr/local/lib/python3.8/site-packages/alphapept/interface.py", line 1375, in run_cli
    cli_overview()
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/alphapept/interface.py", line 1562, in cli_gui
    from alphapept.gui.utils import start_process
  File "/usr/local/lib/python3.8/site-packages/alphapept/gui/utils.py", line 6, in <module>
    import streamlit as st
  File "/usr/local/lib/python3.8/site-packages/streamlit/__init__.py", line 55, in <module>
    from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
  File "/usr/local/lib/python3.8/site-packages/streamlit/delta_generator.py", line 38, in <module>
    from streamlit import config, cursor, env_util, logger, runtime, type_util, util
  File "/usr/local/lib/python3.8/site-packages/streamlit/cursor.py", line 18, in <module>
    from streamlit.runtime.scriptrunner import get_script_run_ctx
  File "/usr/local/lib/python3.8/site-packages/streamlit/runtime/__init__.py", line 16, in <module>
    from streamlit.runtime.runtime import Runtime as Runtime
  File "/usr/local/lib/python3.8/site-packages/streamlit/runtime/runtime.py", line 26, in <module>
    from streamlit.proto.BackMsg_pb2 import BackMsg
  File "/usr/local/lib/python3.8/site-packages/streamlit/proto/BackMsg_pb2.py", line 5, in <module>
    from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/usr/local/lib/python3.8/site-packages/google/protobuf/internal/__init__.py)

Please visit https://github.com/MannLabs/alphapept and report this issue or search for potential solutions. Thanks.

....................................................
Press Enter to continue...
@straussmaximilian
Copy link
Member

Hi,
There is an open issue that gives a status about the current Docker integration:
#302

Did you create your own dockerfile? The error above looks like a dependency issue.

It seems that the people from Renku got it running with their dockerfile: https://renkulab.io/projects/renku-stories/alphapept-gui-streamlit

I will test this and update here.

@straussmaximilian
Copy link
Member

Hi,
so I tested out the Dockerfile, similar to the Renku, I had success with jupyter/base-notebook:python-3.8 as a base.

If you want to check it out, it is on this branch:
https://github.com/MannLabs/alphapept/tree/Docker

Note that I made some small code changes, so you would need to clone the repo and checkout this branch.

This only works for Thermo files for now and I will now have a look at Bruker.

To test:

Make sure Docker has enough resources:

  • I set the CPUs to 2 (Don't know if more will affect stability)
  • I set Memory to 18 GB
  • I set virtual disk limit to 200 GB

This was on an M1-Mac with ARM processor. I don't know if building it on an Intel will change things.

  1. Clone Alphapept Repo. Make sure to cd into that repo.
  2. git fetch origin
  3. git checkout origin/Docker
  4. docker build -t docker-alphapept:latest .

To run things, I mapped a folder on my desktop:

5)docker run -p 8505:8505 -v /Users/username/Desktop/docker:/home/alphapept/ docker-alphapept:latest alphapept gui
Additionally, if you want to try the notebook:

  1. docker run -p 8888:8888 -v /Users/username/Desktop/docker:/home/jovyan/ docker-alphapept:latest jupyter notebook --allow-root

Let me know if this works. I will now try Bruker and update here.

@straussmaximilian
Copy link
Member

I just finished testing the Bruker Dockerfile and updated the Branch. This now worked fine on a Windows test system. The Bruker DLLs are, unfortunately, built for 64, so I had issues running it on an ARM-based M1-Mac. While I got it to build with the platform command it was terribly slow. More detailed instructions etc. are in the Readme on this branch. Will soon merge to main and then close this issue. Feel free to test.

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

2 participants