添加 Others/conda配置访问其他用户的env.md
This commit is contained in:
parent
7da0df6fad
commit
367040b6a1
1 changed files with 21 additions and 0 deletions
21
Others/conda配置访问其他用户的env.md
Normal file
21
Others/conda配置访问其他用户的env.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
**test2用户使用test1用户的env**
|
||||||
|
## 1.环境目录赋权
|
||||||
|
```shell
|
||||||
|
# 使需要使用env的用户拥有访问权限
|
||||||
|
# 若为同组用户,775即可
|
||||||
|
chmod 777 /home/test1
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2.创建软连接
|
||||||
|
```shell
|
||||||
|
# 当前用户下创建软链接
|
||||||
|
ln -s /home/test1/.conda/environments.txt /home/test2/.conda/environments.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
## 3.显示环境名称
|
||||||
|
```shell
|
||||||
|
# 以上两步test2即可使用test1的env
|
||||||
|
# 使用 conda activate /path/to/env即可
|
||||||
|
# 但为了方便使用,可以添加环境名称
|
||||||
|
conda config --append envs_dirs /home/test1/.conda/envs
|
||||||
|
```
|
Loading…
Add table
Add a link
Reference in a new issue