Default / 默认 · August 31, 2021

jupyterhub Docker 设置登陆账户

Table of Content

2021-07-02 记事

docker exec -it jupyterhub bash然后passwd root设置root的密码。

但是,root 管理员总是返回“Spawn failed”错误。
只有在 docker 容器中创建的普通用户才能成功生成。

要安装 conda-pack,请确保您位于 root 或 base 环境中,以便 conda-pack 在子环境中可用。Conda-pack 可通过 conda-forge 或者 PyPI 安装。


conda install -c conda-forge conda-pack


pip install conda-pack


<h1>Pack environment my_env into my_env.tar.gz</h1>
conda pack -n my_env
<h1>Pack environment my_env into out_name.tar.gz</h1>
conda pack -n my_env -o out_name.tar.gz
<h1>Pack environment located at an explicit path into my_env.tar.gz</h1>
conda pack -p /explicit/path/to/my_env

conda pack -n clearhtml37 -o clearhtml37.tar.gz
conda activate clearhtml37</code></li>
<h1>Unpack environment into directory <code>my_env</code></h1>
mkdir -p my_env
tar -xzf my_env.tar.gz -C my_env
<h1>Use Python without activating or fixing the prefixes. Most Python</h1>
<h1>libraries will work fine, but things that require prefix cleanups</h1>
<h1>will fail.</h1>
<h1>Activate the environment. This adds <code>my_env/bin</code> to your path</h1>
source my_env/bin/activate
<h1>Run Python from in the environment</h1>
(my_env) $ python
<h1>Cleanup prefixes from in the active environment.</h1>
<h1>Note that this command can also be run without activating the environment</h1>
<h1>as long as some version of Python is already installed on the machine.</h1>
(my_env) $ conda-unpack

%d bloggers like this: