From 163369b3982c6b20bfa991809d9480b979b47b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=B3=E5=85=89=E5=B0=91=E5=B9=B4?= <849317537@qq.com> Date: Tue, 24 Sep 2024 03:04:13 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9F=BA=E7=A1=80=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E6=9E=84=E5=BB=BA=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..131a0b4 --- /dev/null +++ b/readme.md @@ -0,0 +1,47 @@ + + +## 基础镜像构建 + +```bash +# 安装 jupyter所需要的基础软件 +$ apt install ca-certificates + +# 创建一个rocker用户和他的home +$ useradd -m -s /bin/bash rocker -u 7788 +$ passwd rocker quant_u2Oh0Go9J76aQb3h7Ybgapw@yanguangshaonian + +# 创建一个rocker的用户组并把上面的用户添加到组中 +$ usermod -g 7788 -aG rocker rocker + +# 删除ubuntu用户和他的组 +$ userdel -r ubuntu && groupdel ubuntu + +# 允许sodo权限 /etc/sudoers 添加 %rocker ALL=(ALL:ALL) ALL +$ echo "%rocker ALL=(ALL:ALL) ALL" >> /etc/sudoers + +# vi编辑 /etc/group 最后修改或者添加 rocker:x:7788:rocker +$ vi /etc/group + +# vi 编辑 /etc/passwd 最后修改或者添加 rocker:x:7788:7788:rocker:/home/rocker:/bin/bash +$ vi /etc/passwd + +# vi 编辑 /etc/resolv.conf, 添加 nameserver 8.8.8.8 +$ vi /etc/resolv.conf + +# 创建 /log/logs 文件 +$ mkdir /log +$ touch /log/logs + + +# 上传 pypy 解压之后根据文件夹 放到 /usr 对应的目录 +# 到根目录, 使用 python -m venv python_env 创建虚拟环境 + + + + + + + + + +``` \ No newline at end of file