Closed iguy0 closed 5 months ago
I got it going. The solution and additional useful commands are below:
mkdir /home/jovyan/envs conda init bash exec $SHELL
conda install nb_conda_kernels # https://github.com/Anaconda-Platform/nb_conda_kernels
conda create -p /home/jovyan/envs/python3.11 python=3.11.6 conda activate /home/jovyan/envs/python3.11 conda install ipykernel sudo ipython kernel install --name=python3.11 --display-name "Python 3.11 (Darts)" conda deactivate
jupyter kernelspec list jupyter kernelspec uninstall unwanted-kernel
Not a solution for the original issue but allows me to create additional environments/kernels
@iguy0 See https://github.com/jupyter/docker-stacks/pull/2050.
FYI @mathematicalmichael
Closing as there were no contributions for a while and it seems there is a workaround.
Hi,
I'm trying to add/change the conda/python environment and i'm unable to do so.
Steps to reproduce:
docker run --gpus all -d -it -p 8848:8888 -v /home/USER:/home/jovyan/work -e GRANT_SUDO=yes -e JUPYTER_ENABLE_LAB=yes --user root cschranz/gpu-jupyter:v1.5_cuda-11.6_ubuntu-20.04_python-only
Log into JupyterLab and add a different kernel/conda environment using the terminal
mkdir /home/jovyan/envs conda init bash exec $SHELL conda create -p /home/jovyan/envs/python3.11 python=3.11 conda activate /home/jovyan/envs/python3.11 pip install --user ipykernel python -m ipykernel install --user --name=python3.11 conda deactivate
at this point the kernel is available, but selecting the kernel gives me this
Installing packages via pip and conda end up under /opt/conda when importing them uses the 3.11 environment, and gives a ImportError error. How to fix this ?