refactor: things

This commit is contained in:
2026-03-06 17:17:59 +08:00
parent 8c6087683f
commit 33ab1a5d9d
171 changed files with 293 additions and 29894 deletions
+38 -7
View File
@@ -1,8 +1,5 @@
FROM stereolabs/zed:5.1-gl-devel-cuda12.8-ubuntu24.04
ARG PROXYCHAIN_SOCKS5_HOST=127.0.0.1
ARG PROXYCHAIN_SOCKS5_PORT=36000
# Use USTC mirrors for faster access in China.
RUN if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then \
sed -i 's|http://archive.ubuntu.com/ubuntu/|https://mirrors.ustc.edu.cn/ubuntu/|g' /etc/apt/sources.list.d/ubuntu.sources; \
@@ -24,13 +21,47 @@ RUN if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then \
git \
gdb \
vim \
ranger \
ninja-build \
python3-pip \
python3-setuptools \
python3-venv \
libopencv-dev \
proxychains-ng \
&& if [ -f /etc/proxychains4.conf ]; then \
sed -i 's|^socks4[[:space:]]\\+127\\.0\\.0\\.1[[:space:]]\\+9050|socks5 '"${PROXYCHAIN_SOCKS5_HOST}"' '"${PROXYCHAIN_SOCKS5_PORT}"'|g' /etc/proxychains4.conf; \
fi \
&& rm -rf /var/lib/apt/lists/*
# Install uv, bun, opencode, and zellij with proxy support
ARG HTTP_PROXY_HOST=127.0.0.1
ARG HTTP_PROXY_PORT=36000
ENV http_proxy=http://${HTTP_PROXY_HOST}:${HTTP_PROXY_PORT} \
https_proxy=http://${HTTP_PROXY_HOST}:${HTTP_PROXY_PORT} \
HTTP_PROXY=http://${HTTP_PROXY_HOST}:${HTTP_PROXY_PORT} \
HTTPS_PROXY=http://${HTTP_PROXY_HOST}:${HTTP_PROXY_PORT}
# Install uv (Python package manager)
RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
&& mv /root/.local/bin/uv /usr/local/bin/uv \
&& mv /root/.local/bin/uvx /usr/local/bin/uvx
# Install bun (JavaScript runtime)
RUN curl -fsSL https://bun.sh/install | bash \
&& mv /root/.bun/bin/bun /usr/local/bin/bun
RUN printf "%s\n" \
"[install]" \
'registry = "https://registry.npmmirror.com"' \
> /root/.bunfig.toml \
&& bun add -g opencode-ai @openai/codex \
&& ln -sf /root/.bun/bin/opencode-ai /usr/local/bin/opencode
# Install zellij (terminal multiplexer) - download latest binary
RUN ZELLIJ_VERSION=$(curl -s https://api.github.com/repos/zellij-org/zellij/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') \
&& curl -fsSL "https://github.com/zellij-org/zellij/releases/download/${ZELLIJ_VERSION}/zellij-x86_64-unknown-linux-musl.tar.gz" -o /tmp/zellij.tar.gz \
&& tar -xzf /tmp/zellij.tar.gz -C /usr/local/bin zellij \
&& rm /tmp/zellij.tar.gz \
&& chmod +x /usr/local/bin/zellij
# Unset proxy environment variables after installations
ENV http_proxy="" \
https_proxy="" \
HTTP_PROXY="" \
HTTPS_PROXY=""