添加基础镜像构建说明
parent
6c3f98ad98
commit
163369b398
@ -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 创建虚拟环境
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
Loading…
Reference in New Issue