kernel spec
$ ipython kernel install --name "python3-mm" --user
$ ipython kernel install --name "python-3.8" --user --env PYTHONPATH /workspace/storage/cephrbd/git/pai/ml
$ ipython kernel install --name "python-3.9" --user --env PYTHONPATH /workspace/storage/cephrbd/git/pai/ml
$ ipython kernel install --name "python-3.10" --user --env PYTHONPATH /workspace/storage/cephrbd/git/pai/ml
$ vi /root/.local/share/jupyter/kernels/python-3.9/kernel.json
$ jupyter kernelspec list
Available kernels:
python3-mm /root/.local/share/jupyter/kernels/python3-mm
python3 /opt/conda/envs/py38/share/jupyter/kernels/python3
$ cd /opt/conda/envs/py38/share/jupyter/kernels/python3
$ ls
kernel.json logo-32x32.png logo-64x64.png logo-svg.svg
$ cat kernel.json
{
"argv": [
"python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3 (ipykernel)",
"language": "python",
"metadata": {
"debugger": true
},
"env": {
"PYTHONPATH": "/workspace/storage/cephfs-personal/ml"
}
}
create jupyter kernel from conda env
$ conda install -c anaconda ipykernel
$ pip install ipykernel
$ python3 -m ipykernel install --user --name=<ENV NAME>
autoreload
%load_ext autoreload
%autoreload 2