Docker Pull 使用代理

1
2
3
4
5
6
7
8
9
mkdir /etc/systemd/system/docker.service.d/

vim /etc/systemd/system/docker.service.d/http-proxy.conf


[Service]
Environment="HTTP_PROXY=http://xxxx:8080"
Environment="HTTPS_PROXY=http://xxxxx:8080"
Environment="NO_PROXY=localhost"
1
2
sudo systemctl daemon-reload
sudo systemctl restart docker

构建 Linux 内核

内核

准备环境

1
2
3
# apt update
# apt upgrade
# apt install build-essential linux-headers-$(uname -r) libncurses5-dev flex bison libssl-dev bc libelf-dev python3 dwarves

下载内核源码

1
2
3
# wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.8.4.tar.xz
# tar -xvf linux-6.8.4.tar.xz
# cd linux-6.8.4/

编译内核

1
2
3
# cp /boot/config-`uname -r` .config
# make menuconfig
# make -j4 // 多线程编译

Read More

使用 Docker Compose 运行一个 GPU 环境

安装 Docker

参考 Docker 安装

安装 Docker 显卡驱动

参考 Nvidia 安装

Docker Compose

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
services:
code-server:
image: lscr.io/linuxserver/code-server:latest
container_name: code-server
environment:
- PUID=0
- PGID=0
- PASSWORD=<YOUR_PASSWORD>
- SUDO_PASSWORD=<YOUR_SUDO_PASSWORD>
- DEFAULT_WORKSPACE=/root/
volumes:
- /config:/config
- /root:/root
ports:
- 8443:8443
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]