Run local version of sagemathcloud - almost there

314 views
Skip to first unread message

Sébastien Sablé

unread,
Dec 16, 2015, 6:21:08 AM12/16/15
to sage-...@googlegroups.com
Hi,

I am still trying to get sagemathcloud to work locally in order to be
able to test it and modify it.
I am almost there.

One thing which was not obvious to me is that sagemath needs to be
installed previous to installing sagemathcloud. It is now done and I
can run sage worksheets in SMC, I can also run a terminal and some
latex.

The only thing that is missing now for me is to be able to run a
jupyter notebook in sagemathcloud.
When doing that, the tab is properly created, the ipynb file is created on disk.
However there is nothing on screen except for the message:
"""Failed to start -- unable to connect to remote server"""

I checked that ipython notebook was running fine out of sagemathcloud.

I also checked the logs but could not find any related warning or
error message. Only debug project_exec messages.


Here is the extended install procedure, including instalation of
sagemath and recent ipython notebook:

Pristine Ubuntu 15.10

sudo apt-get install -y python-yaml tmux python-pip ipython git

source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt
$DISTRIB_CODENAME main" | sudo tee
/etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install rethinkdb

sudo apt-get install python-zmq python-tornado python-markupsafe
python-jsonschema
sudo pip install ipython
sudo pip install notebook ipywidgets

sudo -E apt-add-repository -y ppa:aims/sagemath
sudo -E apt-get update
sudo -E apt-get install sagemath-upstream-binary

curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs

git clone https://github.com/sagemathinc/smc
cd smc/src
. smc-env
npm run make

python install.py all --compute --web

cd dev/laptop
./tmux-start-all


firefox http://localhost:5000


Best regards

Sebastien

William Stein

unread,
Dec 16, 2015, 12:33:34 PM12/16/15
to sage-cloud
On Wed, Dec 16, 2015 at 3:21 AM, Sébastien Sablé
<sa...@users.sourceforge.net> wrote:
> Hi,
>
> I am still trying to get sagemathcloud to work locally in order to be
> able to test it and modify it.
> I am almost there.
>
> One thing which was not obvious to me is that sagemath needs to be
> installed previous to installing sagemathcloud. It is now done and I
> can run sage worksheets in SMC, I can also run a terminal and some
> latex.
>
> The only thing that is missing now for me is to be able to run a
> jupyter notebook in sagemathcloud.

That probably isn't implemented! I've only tested a full local
install on my laptop (running new OS X), where I actually don't even
have Sage+Jupyter installed. So I haven't even tried testing Jupyter.

I know for a fact that Jupyter won't fully work (no websockets) when
running SMC inside of an SMC project. The problem there is that there
are two levels of websocket proxying going on, and I don't know if
this is even possible, or if so, how to do it.

> When doing that, the tab is properly created, the ipynb file is created on disk.
> However there is nothing on screen except for the message:
> """Failed to start -- unable to connect to remote server"""

My guess is that this is somehow related to proxying the websocket connection.
> --
> You received this message because you are subscribed to the Google Groups "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/CAJqKL-sU7QjVN3ccU3_Fhupb%2BVV4tCRnweZ4maN26xeHbgrfFA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--

Best Regards,
William

Found/CEO of SageMath, Inc.

Professor of Mathematics

Miguel Angel Marco

unread,
Dec 23, 2015, 6:06:54 AM12/23/15
to sage-cloud, sa...@users.sourceforge.net
I wollowed your step by step instructions, and then i got something that looks like a control panel... but my browser does not get any answer from port 5000

Miguel Angel Marco

unread,
Dec 23, 2015, 6:20:25 AM12/23/15
to sage-cloud, sa...@users.sourceforge.net
Nevermind, it was a problem with the network configuration.

I have the same problem as you: no jupyter notebooks. Everything else seems to work ok. 

But  I see that the terminals and so on are run by the same user. So no isolation. How can I change the configuration to support several users (with the corresponding limits on resource usage and isolation?)

Miguel Angel Marco

unread,
Dec 23, 2015, 6:39:49 AM12/23/15
to sage-cloud, sa...@users.sourceforge.net
Oops, and another issue: latex does not compile. I get the error:

sha1sum: 2015-12-23-123617.sagetex.sage: no file or directory

2006h...@163.com

unread,
Mar 20, 2016, 11:28:43 PM3/20/16
to sage-cloud, sa...@users.sourceforge.net
hi Sable,

I was also following your step but meet below error when doing "python install.py all --compute --web". Seems strange that can't "cd to /static/primus", do you have any idea? Thanks.

export NODE_PATH=$SALVUS_ROOT/smc-hub/node_modules/:$NODE_PATH
cd $SALVUS_ROOT/static/primus
static/primus/update_primus: 7: cd: can't cd to /static/primus


在 2015年12月16日星期三 UTC+8下午7:21:08,Sébastien Sablé写道:

Harald Schilly

unread,
Mar 21, 2016, 7:50:18 AM3/21/16
to sage-...@googlegroups.com, sa...@users.sourceforge.net

On Mon, Mar 21, 2016 at 4:28 AM, <2006h...@163.com> wrote:
Seems strange that can't "cd to /static/primus", do you have any idea?

​does look like your SALVUS_ROOT isn't set. Did you source the environment, and what do your env variables look like regarding this?

-- harald


2006h...@163.com

unread,
Mar 21, 2016, 10:49:03 PM3/21/16
to sage-cloud, sa...@users.sourceforge.net
Yes. have sourced the smc-env.

below please get the details, seems fine~ really have no idea...

laihua@ubuntu:~/smc/src$ echo $SALVUS_ROOT
/home/laihua/smc/src

laihua@ubuntu:~/smc/src$ echo$PATH
bash: echo/home/laihua/smc/src:/home/laihua/smc/src/smc-hub/scripts:/home/laihua/smc/src/scripts/storage:/home/laihua/smc/src/scripts/gce:/home/laihua/smc/src/scripts/hub:/home/laihua/smc/src/node_modules/.bin/:/home/laihua/smc/src/data/local/bin:/home/laihua/smc/src/data/local/sbin:/home/laihua/smc/src/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory


在 2016年3月21日星期一 UTC+8下午7:50:18,Harald Schilly写道:

Dima Pasechnik

unread,
Mar 22, 2016, 10:25:51 AM3/22/16
to sage-cloud, sa...@users.sourceforge.net


On Tuesday, March 22, 2016 at 2:49:03 AM UTC, 2006h...@163.com wrote:
Yes. have sourced the smc-env.

below please get the details, seems fine~ really have no idea...

laihua@ubuntu:~/smc/src$ echo $SALVUS_ROOT
/home/laihua/smc/src

laihua@ubuntu:~/smc/src$ echo$PATH
bash: echo/home/laihua/smc/src:/home/laihua/smc/src/smc-hub/scripts:/home/laihua/smc/src/scripts/storage:/home/laihua/smc/src/scripts/gce:/home/laihua/smc/src/scripts/hub:/home/laihua/smc/src/node_modules/.bin/:/home/laihua/smc/src/data/local/bin:/home/laihua/smc/src/data/local/sbin:/home/laihua/smc/src/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory

you forgot to insert space before $PATH in your last command
It should have been

 laihua@ubuntu:~/smc/src$ echo $PATH

Harald Schilly

unread,
Mar 22, 2016, 10:32:47 AM3/22/16
to sage-...@googlegroups.com, sa...@users.sourceforge.net

On Tue, Mar 22, 2016 at 3:49 AM, <2006h...@163.com> wrote:
Yes. have sourced the smc-env.

​Well, it needs to be done in the same bash session ... i.e. you wrote this earlier:

cd
​​
$SALVUS_ROOT/static/primus

static/primus/update_primus: 7: cd: can't cd to /static/primus

the only explanation (or let's say, the most likely one I have at hand) why it wanted to cd into ​/static/primus is, that the value of 
$SALVUS_ROOT is "nothing" (i.e. essentially an empty string)

-- h


2006h...@163.com

unread,
Mar 22, 2016, 11:50:28 PM3/22/16
to sage-cloud, sa...@users.sourceforge.net
you are right.

在 2016年3月22日星期二 UTC+8下午10:25:51,Dima Pasechnik写道:

2006h...@163.com

unread,
Mar 23, 2016, 12:03:54 AM3/23/16
to sage-cloud, sa...@users.sourceforge.net
yes. it did have done in the same bash session, not sure whether any wrong cache. 

anyway, issue fixed after I redo the steps with a new pristine Ubuntu 15.10 (btw, I've added one step to change the sagemath lib to 777 mode as permission error when doing "python install.py all --compute --web")

now the case is same as Sablé, anyone have idea to the jupyter notebook issue?


在 2016年3月22日星期二 UTC+8下午10:32:47,Harald Schilly写道:

Damon Huang

unread,
Jul 20, 2016, 6:18:11 AM7/20/16
to sage-cloud, sa...@users.sourceforge.net
hi Miguel,

I got similar error too, did you fix this issue? Any hints? Thx.

sha1sum: 2015-12-23-123617.sagetex.sage: no file or directory


William Stein

unread,
Jul 20, 2016, 11:05:00 AM7/20/16
to sage-cloud, sa...@users.sourceforge.net
For what it's worth, here is a ticket for making a Docker images of
SageMathCloud for at least single user dev and testing:

https://github.com/sagemathinc/smc/issues/693

When this exists, getting a copy of SMC up and running on your own
computer will at least be as simple as "docker run ...".

-- William
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/4cd528e4-6c31-4612-877a-e5d4dc8bc9e6%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--

Best Regards,
William Stein

CEO, SageMath, Inc.

Bill Page

unread,
Jul 20, 2016, 11:54:43 AM7/20/16
to sage-cloud, sa...@users.sourceforge.net
Please. :)
Reply all
Reply to author
Forward
0 new messages