Git Product home page Git Product logo

Comments (7)

danlester avatar danlester commented on July 28, 2024

That argument looks correct really. Are you sure you have reveal in the Dockerfile though?

Maybe let us know the full command line or Dockerfile you are using so we can take a closer look.

Thanks,

Dan

from jhsingle-native-proxy.

Trophime avatar Trophime commented on July 28, 2024

Here is my Dockerfile:

FROM python:3.8

# Seup demo environment variables
ENV LANG=en_US.UTF-8 \
        LANGUAGE=en_US.UTF-8 \
        LC_ALL=C.UTF-8

RUN apt-get -qq update && \
    apt-get -y install debian-keyring lsb-release sudo && \
    lsb_release -cs && \

# /usr/local/bin/python -m pip install --upgrade pip
# add --use-feature=2020-resolver to pip3 install
RUN pip3 install \
    jhsingle-native-proxy>=0.0.10 \
    voila \
    voila-reveal \
    ipywidgets numpy matplotlib \
    plotly pandas

# create a user, since we don't want to run as root
RUN useradd -m jovyan && \
    echo jovyan ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/jovyan && \
    sudo chmod 0440 /etc/sudoers.d/jovyan
ENV HOME=/home/jovyan
WORKDIR $HOME
USER jovyan

COPY --chown=jovyan:jovyan entrypoint-reveal.sh /home/jovyan
COPY --chown=jovyan:jovyan index.ipynb /home/jovyan

EXPOSE 8888

#ENTRYPOINT ["/home/jovyan/entrypoint-reveal.sh"]

CMD ["jhsingle-native-proxy", "--destport", "8505", "voila", "/home/jovyan/index.ipynb", "{--}template=reveal",  "{--}port={port}", "{--}no-browser", "{--}Voila.base_url={base_url}/", "{--}Voila.server_url=/"]

the index.ipynb can be found here

The entrypoint-reveal.sh is just a copy your script where I replace Presentation.ipynb by index.ipynb

from jhsingle-native-proxy.

Trophime avatar Trophime commented on July 28, 2024

Thanks for your help
Best

from jhsingle-native-proxy.

danlester avatar danlester commented on July 28, 2024

Is there a reason why you commented out the ENTRYPOINT line?
#ENTRYPOINT ["/home/jovyan/entrypoint-reveal.sh"]

And can you explain in what way it doesn't work - any log output from the container and/or the webpage?

If you can let me know these then I'll try it for myself when I get a chance.

from jhsingle-native-proxy.

Trophime avatar Trophime commented on July 28, 2024

I just comment out the entrypoint just to run the container interactively.

I'll rerun with debug option to get a more detailed log but basically what I get is a blank page in my web browser.

from jhsingle-native-proxy.

Trophime avatar Trophime commented on July 28, 2024

Here is attached the log
reveal.log

from jhsingle-native-proxy.

danlester avatar danlester commented on July 28, 2024

Assuming you are able to run this fine without using the reveal template (but of course, not as a slideshow) then I think this is the situation:

  1. The template=reveal in the CMD is probably irrelevant; it needs to be at the end of the entrypoint.sh file, and of course ENTRYPOINT needs to be reinstated as discussed.
  2. The blank page you see in the reveal template is probably just a bug in reveal itself. You might need the fix committed here but which is not yet published to PyPI. I was able to prove this by copying the new index.html.j2 file into my repo and adding COPY --chown=jovyan:jovyan index.html.j2 /home/jovyan/.local/share/jupyter/voila/templates/reveal towards the end of my Dockerfile. Actually, I also did RUN pip3 install voila-reveal after the USER jovyan line.

But in any case I'm not 100% sure why you are trying to get this example to work... it is really just a proof of concept. In fact there is a simpler more direct example here: https://github.com/danlester/binderhub-voila-direct - this can run Voila on BinderHub.

It would be interesting to hear what you are trying to achieve overall. Maybe you do just want people to be able to run directly on BinderHub so that you don't need to host your slideshow anywhere.

from jhsingle-native-proxy.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.