KarthikGM05 edited a comment on issue #12867:
URL: https://github.com/apache/superset/issues/12867#issuecomment-894738736


   > 
   > 
   > For anyone who might need , here are the settings that helped me
   > 
   > make sure you pull the latest `master` branch ( this doesn't work on the 
current superset - 1.0.0 ) or use 1.0.1 ( or later) once it is released.
   > 
   > **Using Chrome :**
   > 
   > Install chrome webdriver:
   > 
   > ```
   > RUN wget 
https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
   >     apt install -y ./google-chrome-stable_current_amd64.deb && \
   >     wget 
https://chromedriver.storage.googleapis.com/88.0.4324.96/chromedriver_linux64.zip
 && \
   >     unzip chromedriver_linux64.zip && \
   >     chmod +x chromedriver && \
   >     mv chromedriver /usr/bin && \
   >     rm -f google-chrome-stable_current_amd64.deb chromedriver_linux64.zip
   > ```
   > 
   > Add following to the config:
   > 
   > ```
   > FEATURE_FLAGS = { "THUMBNAILS" : True, "LISTVIEWS_DEFAULT_CARD_VIEW" : 
True}
   > THUMBNAIL_SELENIUM_USER = "admin"
   > THUMBNAIL_CACHE_CONFIG: CacheConfig = {
   >     'CACHE_TYPE': 'redis',
   >     'CACHE_DEFAULT_TIMEOUT': 24*60*60,
   >     'CACHE_KEY_PREFIX': 'thumbnail_',
   >     'CACHE_NO_NULL_WARNING': True,
   >     'CACHE_REDIS_URL': 'redis://redis:6379/1'
   > }
   > 
   > 
   > WEBDRIVER_TYPE= "chrome"
   > # for older versions this was  EMAIL_REPORTS_WEBDRIVER = "chrome"
   > WEBDRIVER_OPTION_ARGS = [
   >         "--force-device-scale-factor=2.0",
   >         "--high-dpi-support=2.0",
   >         "--headless",
   >         "--disable-gpu",
   >         "--disable-dev-shm-usage",
   >         "--no-sandbox",
   >         "--disable-setuid-sandbox",
   >         "--disable-extensions",
   >         ]
   > ```
   > 
   > **Using Firefox :**
   > 
   > Install gecko and firefox:
   > 
   > ```
   > RUN apt-get update && apt-get install -y firefox-esr
   > 
   > ENV GECKODRIVER_VERSION 0.29.0
   > RUN wget --no-verbose -O /tmp/geckodriver.tar.gz 
https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz
 \
   >   && rm -rf /opt/geckodriver \
   >   && tar -C /opt -zxf /tmp/geckodriver.tar.gz \
   >   && rm /tmp/geckodriver.tar.gz \
   >   && mv /opt/geckodriver /opt/geckodriver-$GECKODRIVER_VERSION \
   >   && chmod 755 /opt/geckodriver-$GECKODRIVER_VERSION \
   >   && ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/geckodriver \
   >   && ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/wires
   > ```
   > 
   > Add following to the config:
   > 
   > ```
   > FEATURE_FLAGS = { "THUMBNAILS" : True, "LISTVIEWS_DEFAULT_CARD_VIEW" : 
True}
   > THUMBNAIL_SELENIUM_USER = "admin"
   > THUMBNAIL_CACHE_CONFIG: CacheConfig = {
   >     'CACHE_TYPE': 'redis',
   >     'CACHE_DEFAULT_TIMEOUT': 24*60*60,
   >     'CACHE_KEY_PREFIX': 'thumbnail_',
   >     'CACHE_NO_NULL_WARNING': True,
   >     'CACHE_REDIS_URL': 'redis://redis:6379/1'
   > }
   > 
   > 
   > WEBDRIVER_TYPE= "firefox"
   > # for older versions this was  EMAIL_REPORTS_WEBDRIVER = "firefox"
   > WEBDRIVER_OPTION_ARGS = [
   >         "--force-device-scale-factor=2.0",
   >         "--high-dpi-support=2.0",
   >         "--headless",
   >         "--disable-gpu",
   >         "--disable-dev-shm-usage",
   >         "--no-sandbox",
   >         "--disable-setuid-sandbox",
   >         "--disable-extensions",
   >         ]
   > ```
   
   Tried both, but for some reason when I check superset-worker logs, I get 
"chromedriver"/"geckodriver" executable needs to be in PATH. When go inside the 
container with
   ```kubectl exec -n <NAMESPACE> --stdin --tty <POD_NAME> -- /bin/sh```
   I don't see chrome/gecko driver installed at all!
   
   P.S: Superset Version: 1.2.0 and even though the Dockerfile contains gecko 
installation by default, I still can't find it in the container.
   
   Edit:
   Found out that drivers  are not being installed because,
   ```
   The following packages have unmet dependencies:
    google-chrome-stable : Depends: fonts-liberation but it is not installable
                           Depends: libasound2 (>= 1.0.16) but it is not 
installable
                           Depends: libatk-bridge2.0-0 (>= 2.5.3) but it is not 
installable
                           Depends: libatk1.0-0 (>= 2.2.0) but it is not 
installable
                           Depends: libatspi2.0-0 (>= 2.9.90) but it is not 
installable
                           Depends: libcups2 (>= 1.4.0) but it is not 
installable
                           Depends: libdbus-1-3 (>= 1.5.12) but it is not 
installable
                           Depends: libdrm2 (>= 2.4.38) but it is not 
installable
                           Depends: libgbm1 (>= 8.1~0) but it is not installable
                           Depends: libgtk-3-0 (>= 3.9.10) but it is not 
installable or
                                    libgtk-4-1 but it is not installable
                           Depends: libnspr4 (>= 2:4.9-2~) but it is not 
installable
                           Depends: libnss3 (>= 2:3.22) but it is not 
installable
                           Depends: libxcomposite1 (>= 1:0.4.4-1) but it is not 
installable
                           Depends: libxdamage1 (>= 1:1.1) but it is not 
installable
                           Depends: libxfixes3 but it is not installable
                           Depends: libxkbcommon0 (>= 0.4.1) but it is not 
installable
                           Depends: libxrandr2 but it is not installable
                           Depends: libxshmfence1 but it is not installable
                           Depends: xdg-utils (>= 1.0.2) but it is not 
installable
                           Recommends: libu2f-udev but it is not installable
                           Recommends: libvulkan1 but it is not installable
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to