Skip to content

Commit

Permalink
functional (I think) lgo kernel
Browse files Browse the repository at this point in the history
lgo version of Go kernel for Jupyter is working in tests
but hasn't been stressed very heavily
Also, dockerfile was tweaked to do yum update in the
second stage again, increasing size, but possibly making
things better somehow
  • Loading branch information
echowhisky committed May 29, 2018
1 parent 46830df commit cd2f883
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,14 @@ ENV CONDA_DIR=/opt/conda \
LANGUAGE=en_US.UTF-8
ENV PATH=$CONDA_DIR/bin:$PATH \
HOME=/home/$NB_USER \
JUPYTER=/opt/conda/bin/jupyter

JUPYTER=/opt/conda/bin/jupyter
ENV GOPATH=$HOME/.local/share/go \
LGOPATH=$HOME/.local/share/lgo

# second stage install packages and cleanup
USER root
# RUN yum -y update \
RUN yum -y install \
RUN yum -y update \
&& yum -y install \
sudo \
gcc \
epel-release \
Expand Down
3 changes: 2 additions & 1 deletion kernels/go/kernel.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"argv":["/opt/conda/share/jupyter/kernels/installers/dynamic_lgo",
"--connection_file={connection_file}",
"kernel",
"--connection_file={connection_file}"],
"display_name":"Go (lgo)",
"language":"go"
}
4 changes: 2 additions & 2 deletions kernels/installers/dynamic_lgo
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env bash

EXECUTABLE=$HOME/.local/share/lgo
EXECUTABLE=$HOME/.local/share/go/bin/lgo

if [ ! -e "$EXECUTABLE" ]; then
echo "Installing the lgo kernel for the Go language..."
sudo yum install zeromq-devel
sudo yum -y update && sudo yum install -y zeromq-devel
conda install -y -c conda-forge git go
export GOPATH=$HOME/.local/share/go
go get github.com/yunabe/lgo/cmd/lgo && go get -d github.com/yunabe/lgo/cmd/lgo-internal
Expand Down

0 comments on commit cd2f883

Please sign in to comment.