68 lines
2.7 KiB
Docker
68 lines
2.7 KiB
Docker
FROM stereolabs/zed:5.1-gl-devel-cuda12.8-ubuntu24.04
|
|
|
|
# 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; \
|
|
sed -i 's|http://security.ubuntu.com/ubuntu/|https://mirrors.ustc.edu.cn/ubuntu/|g' /etc/apt/sources.list.d/ubuntu.sources; \
|
|
elif [ -f /etc/apt/sources.list ]; then \
|
|
sed -i 's|http://archive.ubuntu.com/ubuntu/|https://mirrors.ustc.edu.cn/ubuntu/|g' /etc/apt/sources.list; \
|
|
sed -i 's|http://security.ubuntu.com/ubuntu/|https://mirrors.ustc.edu.cn/ubuntu/|g' /etc/apt/sources.list; \
|
|
fi \
|
|
&& mkdir -p /etc/pip \
|
|
&& printf "%s\n" \
|
|
"[global]" \
|
|
"index-url = https://pypi.mirrors.ustc.edu.cn/simple" \
|
|
"trusted-host = pypi.mirrors.ustc.edu.cn" \
|
|
> /etc/pip.conf \
|
|
&& apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
cmake \
|
|
git \
|
|
gdb \
|
|
vim \
|
|
ranger \
|
|
ninja-build \
|
|
python3-pip \
|
|
python3-setuptools \
|
|
python3-venv \
|
|
libopencv-dev \
|
|
&& 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=""
|