【经验总结】Jupyter 配置内核

1. 背景描述

使用 国家超算互联网中心 的服务器,创建

jupyterlab 容器,想在之前 conda 创建的环境中运行,可是不行,进入容器就直接进入 jupyterlab

2. 解决方法

配置内核

2.1 激活环境

bash 复制代码
conda activate peft

2.2 安装内核

bash 复制代码
pip install ipykernel -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install ipywidgets -i https://pypi.tuna.tsinghua.edu.cn/simple

2.3 添加内核

bash 复制代码
~$ python -m ipykernel install --user --name=peft  --display-name peft
Installed kernelspec peft in /public/home/acc5trotmy/.local/share/jupyter/kernels/peft

查看内核

bash 复制代码
$ jupyter kernelspec list
Available kernels:
  python3    /public/home/acc5trotmy/.conda/envs/peft/share/jupyter/kernels/python3
  peft       /public/home/acc5trotmy/.local/share/jupyter/kernels/peft

此时启动页有了 peft 内核

3. 使用内核

打开任意 .ipynb 的python 代码,在右上方小甲虫旁边 选择内核

相关推荐
云和数据.ChenGuang18 分钟前
深入解析 Python 的 dir():从用法到 CPython 源码实现
开发语言·人工智能·python·langchain
荣码3 小时前
长上下文与大文档处理:200页PDF怎么喂给AI,我踩了4个坑
java·python
databook4 小时前
Pandas 与 Polars:语法、性能和资源占用方面的对比
python·数据分析·pandas
威哥爱编程4 小时前
Python 智能体开发实战 10:本地跑得好好的,一并发就崩?把它做成一个能上线的服务
python·agent
威哥爱编程4 小时前
Python 智能体开发实战 09:改了提示词,到底是变好还是变坏?搭一套能打分的离线评测
python·agent
meiying88384 小时前
多快递公司快递单号批量查询接口怎么对接?Python 聚合查询实现
java·大数据·python
Hello_Pyhx5 小时前
Deep-Live-Cam 源码配置思路:环境、模型与执行后端分开排查
python
张张123y5 小时前
后端第十六课:Multi-Agent 多智能体(让多个 Agent 分工协作)
大数据·数据库·人工智能·python·deepseek·dsh·agent 框架
全栈练习生5 小时前
大规模智能体仿真
python·ai
code2cat6 小时前
【随笔】vLLM前缀缓存:相同的开头怎样少算一次
人工智能·python·缓存·vllm