如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
IllumiDesk为Flatiron School提供的工作区镜像的Dockerfile及相关资源。
bashmake venv
bashmake build-all
独立运行镜像有助于测试:
bashdocker run -p 8888:8888 illumidesk/flatiron-notebook:latest
然后,访问 http://localhost:8888 即可进入Jupyter Notebook服务器。
有关更多
docker run ...选项,请参考 Docker文档。
bashmake test
| 镜像 | DockerHub链接 |
|---|---|
| illumidesk/flatiron-notebook | |
| illumidesk/flatiron-grader |
可单独构建基础镜像或一次性构建所有镜像。使用 TAG 参数添加自定义标签,若未指定,TAG 默认值为 latest。
构建所有镜像:
bashmake build-all
使用自定义标签构建单个镜像:
bashmake build/flatiron-notebook TAG=mytag
dockerfileFROM jupyter/scipy-notebook:python-3.9.5 RUN ... 执行操作 # 执行操作后确保运行fix-permissions USER root RUN fix-permissions "${HOME}" \ && fix-permissions "${CONDA_DIR}" USER "${NB_USER}"
若需使用非IllumiDesk的组织,需在DockerHub或其他兼容Docker镜像的 registry 中创建组织账户。docker push ... 命令默认将镜像推送到DockerHub registry。如需推送到其他registry,请参考Docker官方文档。
示例:
bashdocker push illumidesk/flatiron-notebook:python-3.9.5
bashmake venv
bashmake lint-all
bashmake build-all make test
有两种添加额外依赖的方式:
1. 更新 spec-list.txt 文件中的conda/pip依赖
与Python的 requirements.txt 类似,spec-list.txt 用于锁定依赖树。不同之处在于 spec-list.txt 同时包含conda和pip依赖。
在Docker镜像中更新依赖后,按以下步骤更新 spec-list.txt 文件:
bashdocker run -it --rm -v $(pwd):/tmp illumidesk/flatiron-notebook:<your-tag> /bin/bash ... 安装conda/pip包的步骤 ... conda list --explicit > /tmp/flatiron-notebook/spec-list.txt
注意:将
<your-tag>替换为构建镜像时使用的标签。若使用make命令,默认值位于Makefile中;若使用原生docker build ...命令,默认值位于Dockerfile的FROM指令中。
2. 更新Dockerfile(s)以添加额外依赖
3. 使用自定义参数(ARGS)构建Docker镜像
使用 docker build 命令的 --build-args 标志覆盖Dockerfile中包含的参数。例如,若要构建/测试使用不同版本Apache Spark(假设版本为 1.2.3)的镜像,可按如下方式构建:
bashdocker build --build-args spark_version=1.2.3 -t illumidesk/flatiron-notebook:mytag flatiron-notebook/.
或
bashmake DARGS="--build-args spark_version=1.2.3" build/flatiron-notebook
本仓库配置了两个环境:
main 分支production 分支开发和生产版本通过DockerHub构建动作构建,分别对应评分器和终端用户Notebook的 illumidesk/flatiron-grader 和 illumidesk/flatiron-notebook。
以下步骤适用于 main 和 production 分支。
Fork 选项分叉本仓库。bash$ git clone https://github.com/<github-account>/flatiron-stacks.git
注意:将上述
<github-account>占位符替换为您的GitHub用户名。
bashgit remote add upstream https://github.com/illumidesk/flatiron-stacks.git
bashgit remote -v
上述命令应返回类似以下的输出:
bashorigin https://github.com/foobar/flatiron-stacks (fetch) origin https://github.com/foobar/flatiron-stacks (push) upstream https://github.com/illumidesk/flatiron-stacks (fetch) upstream https://github.com/illumidesk/flatiron-stacks (push)
bash$ make dev $ source venv/bin/activate
或
bash$ virtualenv -p python3 venv $ python3 -m pip install -r dev-requirements.txt $ source venv/bin/activate
bash$ git checkout -b branch-name-here
对要解决的问题进行适当修改。按照 构建和测试 部分的说明构建和测试镜像。请注意,这些只是基本验证,建议使用实际Jupyter Notebook(*.ipynb)文件运行测试。
添加并提交更改的文件:
bashgit add . git commit -m "my commit message here"
bash$ git push origin <branch-name-here>
Updates 代替 Updated 或 Updating。main 或 production 分支。main 分支将触发DockerHub构建,标签为 pyspark-dev;合并到 production 分支将创建标签为 pyspark 的构建。#flatiron-support Slack频道向IllumiDesk支持团队发送支持请求。如无法访问该频道,可访问 [***] 与客户支持代理聊天获取支持。这些镜像基于 jupyter/docker-stacks 镜像。参考其文档 获取完整配置选项。
MIT
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。





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