File size: 3,258 Bytes
486f8fb
 
310ecc0
486f8fb
 
 
 
 
 
 
 
 
310ecc0
486f8fb
 
 
310ecc0
486f8fb
 
 
310ecc0
 
 
 
 
 
 
 
486f8fb
 
 
 
 
310ecc0
 
 
 
486f8fb
 
 
 
310ecc0
 
 
2189464
 
310ecc0
 
486f8fb
 
 
310ecc0
 
 
810268b
310ecc0
 
 
 
5c0effe
 
310ecc0
7368a01
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310ecc0
 
 
 
10ddadc
486f8fb
 
 
310ecc0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
FROM ubuntu:22.04

LABEL description="AI Coding Workspace · code-server + Continue + OpenCode + Aider + omp"

ENV DEBIAN_FRONTEND=noninteractive
ENV HOME=/root
ENV SHELL=/bin/bash
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8

RUN apt-get update && apt-get install -y --no-install-recommends \
    curl wget git git-lfs \
    vim nano htop \
    python3 python3-pip python3-venv python3-dev \
    build-essential pkg-config cmake \
    sudo locales jq unzip zip tar gzip xz-utils bzip2 \
    ca-certificates gnupg openssh-client ripgrep procps iproute2 \
    && locale-gen en_US.UTF-8 \
    && rm -rf /var/lib/apt/lists/*

RUN curl -fsSL "https://go.dev/dl/go1.22.5.linux-amd64.tar.gz" -o /tmp/go.tar.gz \
    && tar -C /usr/local -xzf /tmp/go.tar.gz \
    && rm /tmp/go.tar.gz
ENV PATH=$PATH:/usr/local/go/bin

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH=$PATH:/root/.cargo/bin

RUN curl -fsSL "https://nodejs.org/dist/v20.19.0/node-v20.19.0-linux-x64.tar.xz" \
      -o /tmp/node.tar.xz \
    && tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 \
    && rm /tmp/node.tar.xz \
    && npm install -g yarn pnpm
ENV PATH=$PATH:/root/.local/share/pnpm:/root/.npm-global/bin

RUN curl -fsSL https://astral.sh/uv/install.sh | sh
ENV PATH=$PATH:/root/.local/bin

RUN curl -fsSL https://code-server.dev/install.sh | sh \
    && rm -rf /tmp/code-server*

RUN curl -fsSL "https://github.com/caddyserver/caddy/releases/download/v2.8.4/caddy_2.8.4_linux_amd64.tar.gz" \
      -o /tmp/caddy.tar.gz \
    && tar -xzf /tmp/caddy.tar.gz -C /usr/local caddy \
    && mv /usr/local/caddy /usr/local/bin/caddy \
    && chmod +x /usr/local/bin/caddy \
    && rm /tmp/caddy.tar.gz

RUN pip3 install --no-cache-dir \
    ipykernel requests httpx \
    numpy pandas black isort pylint \
    huggingface_hub \
    aider-chat

RUN npm install -g opencode-ai

RUN curl -fsSL https://bun.sh/install | bash
ENV PATH=$PATH:/root/.bun/bin

RUN bun install -g @oh-my-pi/pi-coding-agent@18.0.4 \
    || echo "WARN: omp install failed (upstream), skip"

RUN for ext in ms-python.python \
    ms-toolsai.jupyter \
    ms-toolsai.jupyter-keymap \
    ms-toolsai.vscode-jupyter-cell-tags \
    ms-toolsai.vscode-jupyter-slideshow \
    esbenp.prettier-vscode \
    eamodio.gitlens \
    mhutchie.git-graph \
    PKief.material-icon-theme \
    formulahendry.code-runner \
    christian-kohler.path-intellisense \
    dbaeumer.vscode-eslint \
    redhat.vscode-yaml \
    redhat.vscode-xml \
    tamasfe.even-better-toml \
    davidanson.vscode-markdownlint \
    golang.go \
    rust-lang.rust-analyzer \
    gruntfuggly.todo-tree \
    donjayamanne.githistory \
    mechatroner.rainbow-csv \
    wayou.vscode-todo-highlight \
    aaron-bond.better-comments \
    njpwerner.autodocstring \
    codezombiech.gitignore \
    github.vscode-github-actions \
    jeff-hykin.better-dockerfile-syntax \
    timonwong.shellcheck \
    yzhang.markdown-all-in-one \
    continue.continue; do \
      code-server --install-extension "$ext" || LOG="SKIP: $ext"; echo "$LOG"; \
    done

COPY Caddyfile /etc/caddy/Caddyfile
COPY port-manager.js /port-manager.js
COPY start.sh /start.sh
RUN chmod +x /start.sh

WORKDIR /root
EXPOSE 7860
CMD ["/start.sh"]