当前位置: 首页 > news >正文

AutoDL 云服务器:普通 用户 miniconda 配置

AutoDL 初始状态下只有root用户,miniconda 安装在root用户目录下

///

增加普通用户

root@autodl-container-1c0641804d-5bb7040c:~/Desktop# apt updateroot@autodl-container-1c0641804d-5bb7040c:~/Desktop#  apt install sudoroot@autodl-container-1c0641804d-5bb7040c:~/Desktop# adduser zhenglfroot@autodl-container-1c0641804d-5bb7040c:~/Desktop# usermod -aG sudo zhenglfroot@autodl-container-1c0641804d-5bb7040c:~/Desktop# su zhenglf

普通用户conda配置

zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ python
bash: python: command not found
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda
bash: conda: command not found
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ sudo /root/miniconda3/bin/conda init bash
no change     /root/miniconda3/condabin/conda
no change     /root/miniconda3/bin/conda
no change     /root/miniconda3/bin/conda-env
no change     /root/miniconda3/bin/activate
no change     /root/miniconda3/bin/deactivate
no change     /root/miniconda3/etc/profile.d/conda.sh
no change     /root/miniconda3/etc/fish/conf.d/conda.fish
no change     /root/miniconda3/shell/condabin/Conda.psm1
no change     /root/miniconda3/shell/condabin/conda-hook.ps1
no change     /root/miniconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change     /root/miniconda3/etc/profile.d/conda.csh
no change     /home/zhenglf/.bashrc
No action taken.
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ source  /home/zhenglf/.bashrc
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ cat  /home/zhenglf/.bashrc | grep conda
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/root/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"eval "$__conda_setup"if [ -f "/root/miniconda3/etc/profile.d/conda.sh" ]; then. "/root/miniconda3/etc/profile.d/conda.sh"export PATH="/root/miniconda3/bin:$PATH"
unset __conda_setup
# <<< conda initialize <<<
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda
bash: conda: command not found
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ sudo chmod -R 777 /root
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda
usage: conda [-h] [-V] command ...conda is a tool for managing and deploying applications, environments and packages.Options:positional arguments:commandclean        Remove unused packages and caches.compare      Compare packages between conda environments.config       Modify configuration values in .condarc. This is modeled after the git config command. Writes to the user .condarc file (/home/zhenglf/.condarc) by default.create       Create a new conda environment from a list of specified packages.help         Displays a list of available conda commands and their help strings.info         Display information about current conda install.init         Initialize conda for shell interaction. [Experimental]install      Installs a list of packages into a specified conda environment.list         List linked packages in a conda environment.package      Low-level conda package utility. (EXPERIMENTAL)remove       Remove a list of packages from a specified conda environment.uninstall    Alias for conda remove.run          Run an executable in a conda environment. [Experimental]search       Search for packages and display associated information. The input is a MatchSpec, a query language for conda packages. See examples below.update       Updates conda packages to the latest compatible version.upgrade      Alias for conda update.optional arguments:-h, --help     Show this help message and exit.-V, --version  Show the conda version number and exit.conda commands available from other packages:env
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda env list
# conda environments:
#
base                  *  /root/miniconda3zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda activate baseCommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run$ conda init <SHELL_NAME>Currently supported shells are:- bash- fish- tcsh- xonsh- zsh- powershellSee 'conda init --help' for more information and options.IMPORTANT: You may need to close and restart your shell after running 'conda init'.zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ source  /root/miniconda3/bin/activate
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda deactivate
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda activate base
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ which python
/root/miniconda3/bin/python
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$

(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ history1  sudo /root/miniconda3/bin/conda init bash2  cat  /home/zhenglf/.bashrc3  python4  python35  source  /home/zhenglf/.bashrc6  python7  reset8  python9  conda10  sudo /root/miniconda3/bin/conda init bash11  cat  /home/zhenglf/.bashrc12  cat  /home/zhenglf/.bashrc | grep conda13  reset14  python15  conda16  sudo /root/miniconda3/bin/conda init bash17  source  /home/zhenglf/.bashrc18  cat  /home/zhenglf/.bashrc | grep conda19  conda20  sudo chmod -R 777 /root21  conda22  conda env list23  conda activate base24  source  /root/miniconda3/bin/activate25  conda deactivate26  conda activate base27  which python28  history
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$

///

相关文章:

AutoDL 云服务器:普通 用户 miniconda 配置

AutoDL 初始状态下只有root用户&#xff0c;miniconda 安装在root用户目录下 /// 增加普通用户 rootautodl-container-1c0641804d-5bb7040c:~/Desktop# apt updaterootautodl-container-1c0641804d-5bb7040c:~/Desktop# apt install sudorootautodl-container-1c0641804d-5…...

渲染流程概述

渲染流程包括 CPU应用程序端渲染逻辑 和 GPU渲染管线 一、CPU应用程序端渲染逻辑 剔除操作对物体进行渲染排序打包数据调用Shader SetPassCall 和 Drawcall 1.剔除操作 视椎体剔除 &#xff08;给物体一个包围盒&#xff0c;利用包围盒和摄像机的视椎体进行碰撞检测&#xf…...

前端力扣刷题 | 4:hot100之 子串

560. 和为K的子数组 给你一个整数数组 nums 和一个整数 k &#xff0c;请你统计并返回 该数组中和为 k 的子数组的个数 。 子数组是数组中元素的连续非空序列。 示例&#xff1a; 输入&#xff1a;nums [1,1,1], k 2 输出&#xff1a;2 法一&#xff1a;暴力法 var subar…...

Julia 之 @btime 精准测量详解

Julia 语言因其高性能和易用性在科学计算、数据分析等领域获得了广泛关注。在性能优化中&#xff0c;精准测量代码执行时间是至关重要的任务&#xff0c;而 Julia 提供了强大的工具 btime 来辅助这一任务。本文将围绕 Julia 的 btime 来展开&#xff0c;帮助读者深入理解并高效…...

【Django教程】用户管理系统

Get Started With Django User Management 开始使用Django用户管理 By the end of this tutorial, you’ll understand that: 在本教程结束时&#xff0c;您将了解&#xff1a; Django’s user authentication is a built-in authentication system that comes with pre-conf…...

【机器学习】自定义数据集 使用pytorch框架实现逻辑回归并保存模型,然后保存模型后再加载模型进行预测

一、使用pytorch框架实现逻辑回归 1. 数据部分&#xff1a; 首先自定义了一个简单的数据集&#xff0c;特征 X 是 100 个随机样本&#xff0c;每个样本一个特征&#xff0c;目标值 y 基于线性关系并添加了噪声。将 numpy 数组转换为 PyTorch 张量&#xff0c;方便后续在模型中…...

C语言连接Mysql

目录 C语言连接Mysql下载 mysql 开发库 方法介绍mysql_init()mysql_real_connect()mysql_query()mysql_store_result()mysql_num_fields()mysql_fetch_fields()mysql_fetch_row()mysql_free_result()mysql_close() 完整代码 C语言连接Mysql 下载 mysql 开发库 方法一&#xf…...

Windows上通过Git Bash激活Anaconda

在Windows上配置完Anaconda后&#xff0c;普遍通过Anaconda Prompt激活虚拟环境并执行Python&#xff0c;如下图所示&#xff1a; 有时需要连续执行多个python脚本时&#xff0c;直接在Anaconda Prompt下可以通过在以下方式&#xff0c;即命令间通过&&连接&#xff0c;…...

面试经典150题——图

文章目录 1、岛屿数量1.1 题目链接1.2 题目描述1.3 解题代码1.4 解题思路 2、被围绕的区域2.1 题目链接2.2 题目描述2.3 解题代码2.4 解题思路 3、克隆图3.1 题目链接3.2 题目描述3.3 解题代码3.4 解题思路 4、除法求值4.1 题目链接4.2 题目描述4.3 解题代码4.4 解题思路 5、课…...

学习数据结构(1)时间复杂度

1.数据结构和算法 &#xff08;1&#xff09;数据结构是计算机存储、组织数据的方式&#xff0c;指相互之间存在⼀种或多种特定关系的数据元素的集合 &#xff08;2&#xff09;算法就是定义良好的计算过程&#xff0c;取一个或一组的值为输入&#xff0c;并产生出一个或一组…...

项目集成GateWay

文章目录 1.环境搭建1.创建sunrays-common-cloud-gateway-starter模块2.目录结构3.自动配置1.GateWayAutoConfiguration.java2.spring.factories 3.pom.xml4.注意&#xff1a;GateWay不能跟Web一起引入&#xff01; 1.环境搭建 1.创建sunrays-common-cloud-gateway-starter模块…...

【Ubuntu】使用远程桌面协议(RDP)在Windows上远程连接Ubuntu

使用远程桌面协议&#xff08;RDP&#xff09;在Windows上远程连接Ubuntu 远程桌面协议&#xff08;RDP&#xff09;是一种允许用户通过图形界面远程控制计算机的协议。本文将详细介绍如何在Ubuntu上安装和配置xrdp&#xff0c;并通过Windows的远程桌面连接工具访问Ubuntu。 …...

python3+TensorFlow 2.x 基础学习(一)

目录 TensorFlow 2.x基础 1、安装 TensorFlow 2.x 2、TensorFlow 2.x 基础概念 2、1 Eager Execution 2、2 TensorFlow 张量&#xff08;Tensor&#xff09; 3、使用Keras构建神经网络模型 3、1 构建 Sequential 模型 3、2 编译模型 1、Optimizer&#xff08;优化器&a…...

《活出人生的厚度》

《活出人生的厚度》可以从不同角度来理解和实践&#xff0c;以下为你提供一些拓展内容&#xff1a; ### 不断学习与自我提升 - **持续知识更新**&#xff1a;保持对新知识的渴望&#xff0c;利用各种渠道学习&#xff0c;如在线课程、学术讲座、行业研讨会等。例如&#xff0c…...

安装 docker 详解

在平常的开发工作中&#xff0c;我们经常需要部署项目。随着 Docker 容器的出现&#xff0c;大大提高了部署效率。Docker 容器包含了应用程序运行所需的所有依赖&#xff0c;避免了换环境运行问题。可以在短时间内创建、启动和停止容器&#xff0c;大大提高了应用的部署速度&am…...

【Rust自学】16.3. 共享状态的并发

喜欢的话别忘了点赞、收藏加关注哦&#xff08;加关注即可阅读全文&#xff09;&#xff0c;对接下来的教程有兴趣的可以关注专栏。谢谢喵&#xff01;(&#xff65;ω&#xff65;) 16.3.1. 使用共享来实现并发 还记得Go语言有一句名言是这么说的&#xff1a;Do not commun…...

开发者交流平台项目部署到阿里云服务器教程

本文使用PuTTY软件在本地Windows系统远程控制Linux服务器&#xff1b;其中&#xff0c;Windows系统为Windows 10专业版&#xff0c;Linux系统为CentOS 7.6 64位。 1.工具软件的准备 maven&#xff1a;https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-m…...

【2024年华为OD机试】 (B卷,100分)- 乘坐保密电梯(JavaScriptJava PythonC/C++)

一、问题描述 问题描述 我们需要从0楼到达指定楼层m,乘坐电梯的规则如下: 给定一个数字序列,每次根据序列中的数字n,上升n层或下降n层。前后两次的方向必须相反,且首次方向向上。必须使用序列中的所有数字,不能只使用一部分。目标是到达指定楼层m,如果无法到达,则给出…...

maven的打包插件如何使用

默认的情况下&#xff0c;当直接执行maven项目的编译命令时&#xff0c;对于结果来说是不打第三方包的&#xff0c;只有一个单独的代码jar&#xff0c;想要打一个包含其他资源的完整包就需要用到maven编译插件&#xff0c;使用时分以下几种情况 第一种&#xff1a;当只是想单纯…...

solidity高阶 -- 线性继承

Solidity是一种面向合约的高级编程语言&#xff0c;用于编写智能合约。在Solidity中&#xff0c;多线继承是一个强大的特性&#xff0c;允许合约从多个父合约继承属性和方法。本文将详细介绍Solidity中的多线继承&#xff0c;并通过不同的实例展示其使用方法和注意事项。 在Sol…...

[2025CVPR]DeepVideo-R1:基于难度感知回归GRPO的视频强化微调框架详解

突破视频大语言模型推理瓶颈,在多个视频基准上实现SOTA性能 一、核心问题与创新亮点 1.1 GRPO在视频任务中的两大挑战 ​安全措施依赖问题​ GRPO使用min和clip函数限制策略更新幅度,导致: 梯度抑制:当新旧策略差异过大时梯度消失收敛困难:策略无法充分优化# 传统GRPO的梯…...

React19源码系列之 事件插件系统

事件类别 事件类型 定义 文档 Event Event 接口表示在 EventTarget 上出现的事件。 Event - Web API | MDN UIEvent UIEvent 接口表示简单的用户界面事件。 UIEvent - Web API | MDN KeyboardEvent KeyboardEvent 对象描述了用户与键盘的交互。 KeyboardEvent - Web…...

【 java 虚拟机知识 第一篇 】

目录 1.内存模型 1.1.JVM内存模型的介绍 1.2.堆和栈的区别 1.3.栈的存储细节 1.4.堆的部分 1.5.程序计数器的作用 1.6.方法区的内容 1.7.字符串池 1.8.引用类型 1.9.内存泄漏与内存溢出 1.10.会出现内存溢出的结构 1.内存模型 1.1.JVM内存模型的介绍 内存模型主要分…...

为什么要创建 Vue 实例

核心原因:Vue 需要一个「控制中心」来驱动整个应用 你可以把 Vue 实例想象成你应用的**「大脑」或「引擎」。它负责协调模板、数据、逻辑和行为,将它们变成一个活的、可交互的应用**。没有这个实例,你的代码只是一堆静态的 HTML、JavaScript 变量和函数,无法「活」起来。 …...

pycharm 设置环境出错

pycharm 设置环境出错 pycharm 新建项目&#xff0c;设置虚拟环境&#xff0c;出错 pycharm 出错 Cannot open Local Failed to start [powershell.exe, -NoExit, -ExecutionPolicy, Bypass, -File, C:\Program Files\JetBrains\PyCharm 2024.1.3\plugins\terminal\shell-int…...

云原生周刊:k0s 成为 CNCF 沙箱项目

开源项目推荐 HAMi HAMi&#xff08;原名 k8s‑vGPU‑scheduler&#xff09;是一款 CNCF Sandbox 级别的开源 K8s 中间件&#xff0c;通过虚拟化 GPU/NPU 等异构设备并支持内存、计算核心时间片隔离及共享调度&#xff0c;为容器提供统一接口&#xff0c;实现细粒度资源配额…...

C++实现分布式网络通信框架RPC(2)——rpc发布端

有了上篇文章的项目的基本知识的了解&#xff0c;现在我们就开始构建项目。 目录 一、构建工程目录 二、本地服务发布成RPC服务 2.1理解RPC发布 2.2实现 三、Mprpc框架的基础类设计 3.1框架的初始化类 MprpcApplication 代码实现 3.2读取配置文件类 MprpcConfig 代码实现…...

JDK 17 序列化是怎么回事

如何序列化&#xff1f;其实很简单&#xff0c;就是根据每个类型&#xff0c;用工厂类调用。逐个完成。 没什么漂亮的代码&#xff0c;只有有效、稳定的代码。 代码中调用toJson toJson 代码 mapper.writeValueAsString ObjectMapper DefaultSerializerProvider 一堆实…...

用递归算法解锁「子集」问题 —— LeetCode 78题解析

文章目录 一、题目介绍二、递归思路详解&#xff1a;从决策树开始理解三、解法一&#xff1a;二叉决策树 DFS四、解法二&#xff1a;组合式回溯写法&#xff08;推荐&#xff09;五、解法对比 递归算法是编程中一种非常强大且常见的思想&#xff0c;它能够优雅地解决很多复杂的…...

boost::filesystem::path文件路径使用详解和示例

boost::filesystem::path 是 Boost 库中用于跨平台操作文件路径的类&#xff0c;封装了路径的拼接、分割、提取、判断等常用功能。下面是对它的使用详解&#xff0c;包括常用接口与完整示例。 1. 引入头文件与命名空间 #include <boost/filesystem.hpp> namespace fs b…...