You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've loved using the image_viewer and have it setup for my local machine (which took a bit of messing with).
I would like to share it with others, so I'm trying to add it to a rocky85 docker image. I'm sure I have done something wrong but would like the guidance. Note: I know I can render UI elements in this docker container since I have done with other applications(x11).
I have roughly the following.
RUN dnf install -y python3-tkinter
# this is where things breakdown a bit# I've triedRUN pip3 install -q numpy matplotlib Pillow plotly sarpy tk_builder
# also tried without the above install the following in the sarpy_apps directoryRUN python3 -m pip install .
# and the followingRUN python3 setup.py install
Everytime i run it I still get
$ python3 sarpy_apps/apps/image_viewer.py
Traceback (most recent call last):
File "/bpvol/sarpy_apps-master/sarpy_apps/apps/image_viewer.py", line 11, in<module>
import tkinter
ModuleNotFoundError: No module named 'tkinter'
Any guidance or sample dockerfile would be appreciated.
Thanks
The text was updated successfully, but these errors were encountered:
The error suggests tkinter isn't installed in your docker image's python environment. I don't believe this is caused by anything sarpy_apps is doing.
This is likely a result of how your python environment is being constructed, either by something in your base image or elsewhere in your Dockerfile.
I was not able to reproduce your error with this Dockerfile:
FROM rockylinux:8.5
RUN dnf install -y python3 python3-tkinter python3-pip
RUN dnf install -y gcc zlib-devel libjpeg-devel python3-devel # needed by Pillow
COPY sarpy_apps /sarpy_apps
WORKDIR /sarpy_apps
RUN pip3 install .
Then when running it I get an expected DISPLAY error, but this happens after it successfully imports tkinter.
# python3 -m sarpy_apps.apps.image_viewer
Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/sarpy_apps/sarpy_apps/apps/image_viewer.py", line 259, in <module>
main(reader=args.input)
File "/sarpy_apps/sarpy_apps/apps/image_viewer.py", line 237, in main
root = tkinter.Tk()
File "/usr/lib64/python3.6/tkinter/__init__.py", line 2023, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
Hi, I've loved using the image_viewer and have it setup for my local machine (which took a bit of messing with).
I would like to share it with others, so I'm trying to add it to a rocky85 docker image. I'm sure I have done something wrong but would like the guidance. Note: I know I can render UI elements in this docker container since I have done with other applications(x11).
I have roughly the following.
Everytime i run it I still get
Any guidance or sample dockerfile would be appreciated.
Thanks
The text was updated successfully, but these errors were encountered: