twosigma / twosigma/beakerx

Installing Beakerx in a Juptyer image

Open
#8,003 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
2.9k
Forks
383
PR merge metrics
No merged PRs in 30d

Description

I am trying to install Beakerx via conda in a Docker image based on the Jupyter base-notebook image.
I have compiled the following Dockerfile for it:

```
# Use the Jupyter stack
FROM jupyter/base-notebook:f286528a06ac

# This is needed for beakerx
RUN conda config --env --add pinned_packages 'openjdk>8.0.121'

# Install packages such as rise, pandas, ...
RUN conda install -y -c conda-forge tornado=4.5.3 beakerx=1.3.0
```
This seems to build and runs happily. I can use the TableDisplay and create simple plots. However, as soon as I try this trivial example:

```
import pandas as pd
from beakerx import *

import datetime

y = pd.Series([8.7, 8, 8.5])
dates = [datetime.date(2015, 2, 4),
datetime.date(2015, 2, 5),
datetime.date(2015, 2, 6)]
plot = TimePlot()
plot.add(Line(x=dates, y=y))
plot.add(ConstantLine(x=pd.Timestamp("2015-02-05")))
```

I get no output unless I comment the last line! The error message I receive when running the Jupyter server is

```
[IPKernelApp] ERROR | Exception in comm_msg for d2fe16c7d57d4a68bafa6322f1d0cc82
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/beakerx_magics/kernel_magic.py", line 116, in comm_msg
comm.handle_msg(msg)
File "/opt/conda/lib/python3.7/site-packages/ipykernel/comm/comm.py", line 159, in handle_msg
self._msg_callback(msg)
File "/opt/conda/lib/python3.7/site-packages/beakerx/plot/chart.py", line 264, in _handle_msg
params = msg['content']['data']['content']
KeyError: 'content'
```

Is it a crazy idea to install Beaker in a Jupyter image? Shall I avoid this and only use the Beakerx Docker image as a starting point?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.