Hi!
I麓m using this docker in my QNAP and it's wonderful. I麓m trying to run a code to plot some finance data with python. This is the code:
from plotly.offline import iplot, init_notebook_mode
import plotly.graph_objs as go
import plotly.io as pio
import plotly
import os
import numpy as np
init_notebook_mode(connected=True)
N = 100
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
sz = np.random.rand(N)*30
fig = go.Figure()
fig.add_scatter(x=x,
y=y,
mode='markers',
marker={'size': sz,
'color': colors,
'opacity': 0.6,
'colorscale': 'Viridis'
});
iplot(fig)
pio.write_image(fig, 'fig1.png')
All works fine, but the last order, doesn't work. I got this error:
[Return code: 127]
/opt/conda/lib/orca_app/orca: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
Note: When used on Linux, orca requires an X11 display server, but none was
detected. Please install X11, or configure your system with Xvfb. See
the orca README (https://github.com/plotly/orca) for instructions on using
orca with Xvfb.
I supose that I need to install the X11 or configure the system with Xvfb but I have no idea to do it. I check in the link https://github.com/plotly/orca that I need to install libgconf-2-4.
I write in the Terminal:
sudo apt-get install libgtk2.0-0 and libgconf-2-4 but It ask me for [sudo] password for jovyan: but I don't have this pwd.
Who can help me to solve this problem?
Thanks in advance.
Looks like the plotly package from conda-forge might be missing a dependency.
Thanks Parente!
Did you try to check this code in your Jupyter container?
Could you please tell me how can I solve it?
Thanks in advance
Hello,
You can log into a running container as root to perform the installation you want to do.
# Get the container ID
$ docker ps --filter "ancestor=jupyter/scipy-notebook" --format "{{.ID}}"
# Log as root into the container
$ docker exec -it -u root <container-id> bash
# Now you are root in the container
Good luck -- the setup seems to be a bit complicated :smile:
Hello,
You can log into a running container as
rootto perform the installation you want to do.# Get the container ID $ docker ps --filter "ancestor=jupyter/scipy-notebook" --format "{{.ID}}" # Log as root into the container $ docker exec -it -u root <container-id> bash # Now you are root in the containerGood luck -- the setup seems to be a bit complicated 馃槃
Thanks Romainx!!
I麓m using the ContainerStation of QNAP and I have no idea how can I run your command. The Container ID is this: 147f0f680186 (I saw in the properties of the container).
Do you have any idea how can run the code "$ docker exec -it -u root
Thanks in advance
Hello,
Sorry but I don't know if you have access to a running container in this environment. I've no knowledge at all about qnap.
Regards
Ooooh I just resolved this after struggling hard! This will do it I think.
__SUMMARY:__
libgk2.0-0 and libgconf-2-4 and google-chrome-stable, and google-chrome-stable also requires us to add a apt-get repository where we can get it from.USER root
RUN echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' \
| sudo tee -a /etc/apt/sources.list.d/google-chrome.list && \
curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN apt-get update && apt-get -yq dist-upgrade && \
apt-get install -yq --no-install-recommends \
# plotly-orca dependencies
# See the following for more information:
# https://github.com/plotly/orca#linux-troubleshooting-headless-server-configuration
# https://github.com/plotly/orca#linux-troubleshooting-cannot-open-shared-object
xvfb \
libgtk2.0-0 \
libgconf-2-4 \
google-chrome-stable \
&& \
rm -rf /var/lib/apt/lists/*
USER $NB_USER
RUN conda install --quiet --yes --channel plotly \
plotly \
plotly-orca \
&& \
conda clean -tipsy && \
fix-permissions $CONDA_DIR $HOME
RUN ORCA_LOCATION=$(which orca) && \
echo '#!/bin/bash' > $ORCA_LOCATION && \
echo 'xvfb-run -a exec /opt/conda/lib/orca_app/orca "$@"' >> $ORCA_LOCATION && \
chmod +x $ORCA_LOCATION
馃憖 @consideRatio wow, thanks for plowing through that and sharing it. I think that's great fodder for the recipes in the docs if someone would like to submit it.
This issue has been idle for some time now so I'm inclined to close it. I think it would still be great to have the information captured here appear on the recipes page in the doc if someone has the time and interest in vetting it and sending it in as a PR.
Most helpful comment
馃憖 @consideRatio wow, thanks for plowing through that and sharing it. I think that's great fodder for the recipes in the docs if someone would like to submit it.