dmmiller612 / lecture-summarizer

Lecture summarization with BERT
https://arxiv.org/abs/1906.04165
146 stars 36 forks source link

No module named tkinter, frozen georgraphic area dialog at ubuntu installing dialog #6

Open Hellscream64 opened 4 years ago

Hellscream64 commented 4 years ago

When i'm trying to get the service run locally , i faced some problems. I had to do some manual changes to overcome these problems. I thought it would be useful to report over this things

Problem 1:

 ImportError: No module named tkinter

Problem 2: Got stucked on the geographic area input dialog at ubuntu installing dialog (input not accepted):

Preconfiguring packages ...
Configuring tzdata
------------------

Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.

 1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
 2. America     5. Arctic     8. Europe    11. SystemV
 3. Antarctica  6. Asia       9. Indian    12. US
Geographic area:  

The Solution for that was to edit the Dockerfile (added python3-tk and env-variables):

FROM ubuntu:18.04

ENV TZ=Europe/Minsk
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && \
    apt-get install -y sudo \
    tzdata \
    build-essential \
    curl \
    libcurl4-openssl-dev \
    libssl-dev \
    wget \gedit \
    python3-dev \
    python3-pip \
    python3-tk \
    libxrender-dev \
    libxext6 \
    libsm6 \
    openssl

RUN mkdir -p /opt/service
RUN mkdir -p /opt/service/summarizer
COPY summarizer /opt/service/summarizer
COPY server.py /opt/service
COPY requirements.txt /opt/service
WORKDIR /opt/service

RUN pip3 install -r requirements.txt

CMD /bin/bash -c "python3 server.py"

with that changes i was able to build and run the Image