Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The Sage Cell Server---providing a way to embed Sage computations into any web page.

License

NotificationsYou must be signed in to change notification settings

sagemath/sagecell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is SageMathCell - a Sage computation web service.

Our mailing list ishttps://groups.google.com/forum/#!forum/sage-cell

Security Warning

If you are going to run a world accessible SageMathCell server, you must understand security implications and should be able to implement reasonable precautions.

The worker account (which is your own one by default) will be able to execute arbitrary code, which may be malicious. Makesure that you are securing the account properly. Working with a professional IT person is a very good idea here. Since the untrusted accounts can be on any computer, one way to isolate these accounts is to host them in a virtual machine that can be reset if the machine is compromised.

Simple Installation

We assume that you have access to the Internet and can install any needed dependencies. If you need to know more precisely what tools are needed, please consult the scripts for building virtual machine images incontrib/vm.In particular, system packages installed in the base container are listedhere.

  1. Install requirejs:

    sudo apt-get install npm# On Debian based systems we need to make an aliassudo ln -s /usr/bin/nodejs /usr/bin/node
  2. Get and build Sage (export MAKE="make -j8" or something similar can speed things up):

    git clone https://github.com/sagemath/sage.gitpushd sage./bootstrap./configure --enable-download-from-upstream-url# read messages at the end, follow instructions given there.# possibly install more system packages (using apt-get, if on Debian/Ubuntu)makepopd
  3. Prepare Sage for SageMathCell:

    sage/sage -pip install lockfilesage/sage -pip install paramikosage/sage -pip install sockjs-tornadosage/sage -pip install sqlalchemy
  4. Build SageMathCell:

    git clone https://github.com/sagemath/sagecell.gitpushd sagecell../sage/sage -sh -c make

To build just the Javascript components, from thesagecell directory run

make static/embedded_sagecell.js

Configuration

  1. Go into thesagecell directory (you are there in the end of the above instructions).

  2. Copyconfig_default.py toconfig.py. (Or fillconfig.py only with entries that you wish to change from default values.)

  3. Editconfig.py according to your needs. Of particular interest arehost andusername entries of theprovider_info dictionary: you should be able to SSH tousername@hostwithout typing in a password. For example, by default, it assumes you can dossh localhost without typing in a password. Unless you are running a private andfirewalled server for youself, you’ll want to change this to a more restrictive account; otherwiseanyone will be able to execute any code under your username. You can set up a passwordless account using SSH: type “ssh passwordless login” into Google to find lots of guides for doing this, likehttp://www.debian-administration.org/articles/152. You may also wish to adjustdb_config["uri"] (make the database files readableonly by the trusted account).

  4. You may want to adjustlog.py to suit your needs and/or adjust system configuration. By default logging is done via syslog which handles multiple processes better than plain files.

  5. Start the server via

    ../sage/sage web_server.py [-p<PORT_NUMBER>]

    where the default<PORT_NUMBER> is8888 and go tohttp://localhost:<PORT_NUMBER> to use the Sage Cell server.

    When you want to shut down the server, pressCtrl-C in the same terminal.

Javascript Development

Javascript source files are compiled usingWebpack. Sagecell depends on source files copiedfrom the Jupyter notebook project. To start development navigate to thesagecell source directory and run

npm installnpm run build:deps

After this, all dependencies will be located in thebuild/vendor directory. You can now run

npm run build

to buildbuild/embedded_sagecell.js

or

npm run watch

to buildbuild/embedded_sagecell.js and watch files for changes. If a file is changed,embedded_sagecell.js will be automaticallyrebuilt.

License

See theLICENSE.txt file for terms and conditions for usage and aDISCLAIMER OF ALL WARRANTIES.

Browser Compatibility

SageMathCell is designed to be compatible with recent versions of:

  • Chrome
  • Firefox
  • Internet Explorer
  • Opera
  • Safari

If you notice issues with any of these browsers, please let us know.

About

The Sage Cell Server---providing a way to embed Sage computations into any web page.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp