专属
文档
插件
助手
邀请
顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单页面收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题轩辕镜像免费版
其他
关于我们网站地图
热门搜索:
sagecell

luisjba/sagecell

luisjba

Docker SageMathCell (SageCell) - a Sage computation web service

2 次收藏下载次数: 0状态:社区镜像维护者:luisjba仓库类型:镜像最近更新:6 年前
让 AI 帮你使用轩辕镜像? · 展开查看说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

轩辕镜像,不浪费每一次拉取。点击查看
镜像简介
标签下载
镜像标签列表与下载命令
轩辕镜像,不浪费每一次拉取。点击查看

Docker SageMathCell (SageCell)

This is a Dockerized SageMathCell - a Sage computation web service. This image was built using the oficial sagemath https://hub.docker.com/r/sagemath/sagemath and installed the latest https://github.com/sagemath/sagecell providing with the sage version 8.7 and 8.8 (latest) in the docker hub tags sage_8.7_v1.0, sage_8.7_v1.1 , sage_8.8_v1.0 and latest.

With this image you can perform your customization into sage and sagecell to:

  • Install extra libraries into sage with pip.
  • Install custom libraries into sage mounting a volume.
  • Run Jupiter Notebook and SageCell at the same time.
  • Use sage as application into you shell.

Installation

docker pull luisjba/sagecell

or simply continue to the next step.

Running SageCell

To run SageCell:

docker run -d -p 8888:8888 luisjba/sagecell

Then you can open the address http://localhost:8888 in your browser and start using the sagecell to execute sage code by default or other supported languages (Gap, GP, HTML, Macualay2, Maxima, Octave, Python, R and Singular) after accepting the Term of Service (tos) for SageMathCell. You can use the sagecell for https://github.com/sagemath/sagecell/blob/master/doc/embedding.rst Sage computations into any webpage or comunicate with the kernel (the kernel is an IPython kernel) using the provided protocols:

  • HTTP
  • WebSockets
  • SockJS

For detailed information read more about https://github.com/sagemath/sagecell/blob/master/doc/messages.md
in the oficial source code

Customizing SageCell with environment variables

You can customize your SageCell sending the desired environment variables available for the container. This variables are passed to the entry point in the docker container to perform the configuration. Customizing this variables you could:

  • Change the ports to run for SSH, SageCell and Jupiter Notebook.
  • Set the configuration to the config.py file for SageCell.
  • indicate extra libraries to install into sage via pip.
  • install custom libraries into sage in a mounted volume.

Configure service ports

You can customize the ports for SageCell, SSH Server and Jupiter Notebook seting the value to the next available variables:

  • PORT: By default is 8888 and is where SageCell runs.
  • SSH_PORT: By default is 22 and used for SSH Server.
  • JN_PORT: By default is 8080 intended for run the Sage Jupyter Notebook.

Configure SageCell

This configuration is persisted in the config.py file and reconstructed every time that the docker container runs and the container entry point is executed passed the default commands and environment variables.

The config.py file is a Python file and used by SageCell to load the configuration on start up. Please follow the Python syntax when modify this group of variables and set your custom values. For example, a boolean value in Python is True and False. For variables that use numeric values you can set numeric operations ( +, -, *, /, **, sqrt, etc) like 60 * 60 when accepts milliseconds for better understand the conversion to minutes or other time scales.

  • SAGECELL_REQUIRE_TOS: Boolean with default value True. When True Require the user to accept terms of service before evaluation.
  • SAGECELL_KERNEL_DIR: String with default value /home/sage/sagecellkernels. This is the directory in which SageCell stores JSON formatted files for the generated kernels.
  • SAGECELL_BEAT_INTERVAL: Numeric with default value 0.5. Parameters for heartbeat channels checking whether a given kernel is alive.
  • SAGECELL_FIRST_BEAT: Numeric with default value 1.0. Setting first_beat lower than 1.0 may cause JavaScript errors.
  • SAGECELL_MAX_TIMEOUT: Numeric with default value 60 * 90. Allowed idling between interactions with a kernel
  • SAGECELL_MAX_LIFESPAN: Numeric with default value 60 * 119. Even an actively used kernel will be killed after this time
  • SAGECELL_PROVIDER_SETTINGS_MAX_KERNELS: Numeric with default value 10. The maximum number of alive kernels.
  • SAGECELL_PROVIDER_SETTINGS_PRE_FROKED: Numeric with default value 1. The keys to resource_limits can be any available resources for the resource module more information in section section 35.13.1. See RLIMIT_AS is more of a suggestion than a hard limit in Mac OS X Also, Sage may allocate huge AS, making this limit pointless (se discussion).
  • SAGECELL_PROVIDER_SETTINGS_PRE_FROKED_LIMIT_CPU: Numeric with default value 120. The CPU time in seconds.

Install package into sage via pip

We can install our custom packages into sage, setting the package name or more (space separated) into the var SAGE_INSTALL_CUSTOM_LIBS, then the entry point executed by the container will red this packages and install it via pip. For example if you want to install Pythonic XML processing library, the package name in pip is lxml and you have to set into SAGE_INSTALL_CUSTOM_LIBS="lxml" to indicate the container to install it by sage via pip.

docker run --name sagecell -e SAGE_INSTALL_CUSTOM_LIBS="lxml" -d -p 8888:8888 luisjba/sagecell   

Install custom package from docker volume

Another way to install a custom package into sage when this package is not accessible in the pip repository is to copy in a directory into the docker host and mount it as volume with the path /home/sage/libs in the container side.

docker run --name sagecell -v /home/user/my/customs/lib:/home/sage/libs  -d -p 8888:8888 luisjba/sagecell

When the container is stating up, the entry point script check in the /home/sage/libs directory and crete symbolics links into the sage python library directory for every directory found. You can change the directory form where the entry point will find libraries setting the new directory in SAGE_LIBS_DIR=/home/sage/mycustomdirlib with your desired directory value. Don't forget to mount your lib volume pointing to this new directory.

docker run --name sagecell -e SAGE_LIBS_DIR=/home/sage/mycustomdirlib -v /home/user/my/customs/lib:/home/sage/mycustomdirlib  -d -p 8888:8888 luisjba/sagecell

Run SageCell with SageMath as application

This SageCell docker image contains SageMath installed and you can access it as an application into your terminal.

To explain this features, we will run a named docker container passing --name sagecell option to docker for set the name sagecel to the container.

docker run --name sagecell -d -p 8888:8888 luisjba/sagecell

When a SageCell container is running you can run sage by attaching the ssh session using the docker exec utility an execute sage.

docker exec -it <instance_name> bash -c "sage"

As our instance has the sagecell name, we must call the above command as follows

docker exec -it sagecell bash -c "sage"

If you want to set another name to the instance and see the instance name, consult the official doc reference of the command docker ps.

Other software included in the image can be executed similarly:

docker exec -it sagecell bash -c "sage gap"

docker exec -it sagecell bash -c "sage gp"        # PARI/GP

docker exec -it sagecell bash -c "sage maxima"

docker exec -it sagecell bash -c "sage R"

docker exec -it sagecell bash -c "sage singular"

Run SageCell with Jupyter Notebook

You can run the SageCell and the notebook in the same container but you must take care when setting custom ports . SageCell by default runs on the port 8888 and Jupyter Notebook in 8080. You must expose the ports when run the container. This is done in two steps:

  1. Run the a named container with sagecell as name and expose the ports 8888 for SageCell and 8080 for Jupyter Notebook.

     docker run --name sagecell -d -p 8888:8888 -p 8080:8080 luisjba/sagecell
    
  2. Start the notebook with the sage application

     docker exec -it sagecell bash -c "sage -notebook"
    

You can set a custom port for the notebook passing the option --port

docker exec -it sagecell bash -c "sage -notebook --port=8080"

For better configuration to allow connections to the notebook through the Docker network, you can run as follow:

docker exec -it sagecell bash -c "sage -notebook=jupyter --no-browser --ip='*' --port=8080"

If you set a different port than default (8080) for Jupyter Notebook, be sure to connect and expose them in the -p [host_port]:[container_port] option when running the container.

Donate

If this project was usefull for you and you want to thanks me you can buy me a cup of coffe.

![]([]

!https://github.com/luisjba/docker-sagecell/raw/master/images/Donate_QR_Code.png "Buy me a cup of Coffe :")

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 sagecell 镜像标签

docker pull docker.xuanyuan.run/luisjba/sagecell:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull luisjba/sagecell:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

需要其他帮助?请查看我们的 常见问题 Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

免费版与专业版区别

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

排错

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 请求频率

DNS 超时

DNS 解析 · 网络超时

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
luisjba/sagecell
博客Docker 镜像公告与技术博客
热门查看热门 Docker 镜像推荐
教程轩辕镜像功能与使用教程
安装一键安装 Docker 并配置镜像源
官方公众号:源码跳动|官方技术交流群:13763429
官方公众号:源码跳动|官方技术交流群:|问题咨询请:提交工单
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.