abc1181 commited on
Commit
4ca5d81
·
verified ·
1 Parent(s): 6f5bb62

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +63 -0
Dockerfile ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:22.04
2
+
3
+ LABEL description="Code Server · HF Spaces · Full Dev Environment"
4
+
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+ ENV HOME=/root
7
+ ENV SHELL=/bin/bash
8
+ ENV LANG=en_US.UTF-8
9
+ ENV LC_ALL=en_US.UTF-8
10
+
11
+ # ── Base system ────────────────────────────────────────────────────────────
12
+ RUN apt-get update && apt-get install -y \
13
+ curl wget git git-lfs \
14
+ vim nano htop tree watch \
15
+ python3 python3-pip python3-venv python3-dev \
16
+ build-essential pkg-config cmake \
17
+ sudo locales \
18
+ jq unzip zip tar gzip \
19
+ ca-certificates gnupg lsb-release \
20
+ openssh-client \
21
+ ripgrep \
22
+ procps \
23
+ && locale-gen en_US.UTF-8 \
24
+ && rm -rf /var/lib/apt/lists/*
25
+
26
+ # ── Node.js 20 LTS ─────────────────────────────────────────────────────────
27
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
28
+ && apt-get install -y nodejs \
29
+ && npm install -g yarn pnpm \
30
+ && rm -rf /var/lib/apt/lists/*
31
+
32
+ # ── GitHub CLI ─────────────────────────────────────────────────────────────
33
+ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
34
+ | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
35
+ && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
36
+ && echo "deb [arch=$(dpkg --print-architecture) \
37
+ signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] \
38
+ https://cli.github.com/packages stable main" \
39
+ | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
40
+ && apt-get update && apt-get install -y gh \
41
+ && rm -rf /var/lib/apt/lists/*
42
+
43
+ # ── code-server ────────────────────────────────────────────────────────────
44
+ RUN curl -fsSL https://code-server.dev/install.sh | sh \
45
+ && rm -rf /tmp/code-server*
46
+
47
+ # ── Python packages ────────────────────────────────────────────────────────
48
+ RUN pip3 install --no-cache-dir \
49
+ ipykernel \
50
+ requests httpx \
51
+ numpy pandas \
52
+ black isort pylint \
53
+ huggingface_hub
54
+
55
+ # ── Dirs ───────────────────────────────────────────────────────────────────
56
+ RUN mkdir -p /root/.config/code-server /workspace
57
+
58
+ COPY start.sh /start.sh
59
+ RUN chmod +x /start.sh
60
+
61
+ WORKDIR /workspace
62
+ EXPOSE 7860
63
+ CMD ["/start.sh"]