D4RL 包括一系列在离线强化学习中广泛使用的环境和数据集,mujoco-py
是一个用于与 MuJoCo 物理引擎交互的 Python 包,是 D4RL 的重要依赖之一。这两个包已经很久没有更新和维护,在安装时可能遇到一系列问题,但是它们仍然是离线强化学习领域的重要工具。本文以 Ubuntu 下的 conda 环境为例,介绍如何安装 D4RL 和 mujoco-py 库。如果你正在使用其他 Linux 发行版、使用 venv 或在容器中安装,可能需要根据实际情况进行调整。
D4RL 包括一系列在离线强化学习中广泛使用的环境和数据集,mujoco-py
是一个用于与 MuJoCo 物理引擎交互的 Python 包,是 D4RL 的重要依赖之一。这两个包已经很久没有更新和维护,在安装时可能遇到一系列问题,但是它们仍然是离线强化学习领域的重要工具。本文以 Ubuntu 下的 conda 环境为例,介绍如何安装 D4RL 和 mujoco-py 库。如果你正在使用其他 Linux 发行版、使用 venv 或在容器中安装,可能需要根据实际情况进行调整。
Docker 和 Podman 中的 Linux Capabilities
在运行 Docker (或 Podman) 容器时,有时即使使用 root
用户或者使用了 sudo
,也会出现 Operation not permitted
的错误信息。这是因为容器中的 root
并不具有完整的 root
权限。这种权限的控制是通过 Linux capabilities 实现的。本文将首先介绍 Linux capabilities 的概念,然后以 Docker 为例介绍如何调整容器的 capabilities,最后介绍 Docker 和 Podman 在默认 capabilities 上的差异,以为容器的开发者和用户提供参考。
Linux Capabilities in Docker and Podman
When running Docker (or Podman) containers, sometimes you may encounter Operation not permitted
error messages even if you are using the root
user or sudo
. This is because the root
in the container does not have full root
permissions. This permission control is implemented through Linux capabilities. This article will first introduce the concept of Linux capabilities, then use Docker as an example to introduce how to adjust the Linux capabilities of containers, and finally introduce the differences between Docker and Podman in default capabilities, providing reference for container developers and users.
我最喜欢的 shell 是 zsh,它的自动补全功能非常强大,但是经过长期的使用我也感受到一些问题。为了解决这些问题,我查找资料并按自己的喜好配置了它的自动补全系统。本文记录了我的配置。
Cloudflare WARP is a free VPN service provided by Cloudflare. As most service providers consider its exit IP as a reputable residential broadband IP, many people use it for accessing websites that have strict risk control policies, especially when their server’s IP address is not clean. However, when we use it on our own servers, we may encounter the following issues:
1.1.1.1 with WARP
, blocks all inbound connections, which means that websites and services on servers cannot be accessed.Local Proxy
mode does not have the problem of blocking inbound connections, the HTTPS/SOCKS5 proxy it provides cannot transmit UDP packets.This article will run the official WARP client in Docker to solve the above problem. The project is published on GitHub.
Cloudflare WARP 是 Cloudflare 提供的免费 VPN 服务,由于多数服务商都将其出口 IP 视作信誉良好的家宽 IP,许多人将其用于 IP 地址较脏的服务器,以便访问风控较严格的网站。然而当我们将它在自己的服务器上使用时,会遇到以下的问题:
1.1.1.1 with WARP
下会阻断所有入站连接,这意味着服务器上的网站和服务都无法被访问Local Proxy
模式下尽管没有阻断入站连接的问题,其提供的 HTTPS/SOCKS5 代理并不能传输 UDP 数据包本文将在 Docker 中运行官方 WARP 客户端,以解决上述问题。项目代码已经发布到 GitHub。
matplotlib 是一个被广泛使用的 Python 绘图库,但是在远程服务器等无头设备上使用时,可能会遇到 plt.show()
无法显示和缺少中文字体的问题。本文将介绍如何解决这些问题。
使用 Deploy key 将私有 GitHub 仓库克隆到境内服务器
由于某些原因,我们往往无法直接在境内服务器上克隆 GitHub 上的仓库。对于公开仓库,我们可以通过公益或自建的反向代理来解决这个问题。但是当我们希望将仓库保持私有时,我们遇到了以下几个问题:
本文将通过转发 GitHub 的 SSH 端口并使用 Deploy key 来解决这些问题。使用该方案,服务器上的凭据将仅限于读取指定仓库,且中间人无法获得你的凭据。
在更换硬盘并重装了电脑之后,我计划将所有开发环境都放在 Windows Subsystem for Linux (WSL) 上,以避免在 Windows 上遇到依赖地狱。这篇文章介绍了我对基于 WSL 的开发环境的搭建过程。