habppyar commited on
Commit
b762fb8
·
verified ·
1 Parent(s): cb7ceba

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -11
Dockerfile CHANGED
@@ -1,9 +1,5 @@
1
  FROM node:20-slim
2
 
3
- # System deps
4
- # - python3 + python3-venv: hf CLI installer uses venv
5
- # - curl: to fetch installer
6
- # - sqlite3: for consistent SQLite backup
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  ca-certificates \
9
  bash \
@@ -16,26 +12,23 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
16
  python3-venv \
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
- # Install Hugging Face CLI (official one-liner installer; creates its own venv)
20
- # Place `hf` into /usr/local/bin so it's available to USER node.
21
- ENV HF_HOME=/opt/hf
22
  ENV HF_CLI_BIN_DIR=/usr/local/bin
23
  RUN curl -LsSf https://hf.co/cli/install.sh | bash -s -- --no-modify-path
24
 
25
- # Verify hf exists
26
- RUN hf version && hf --help >/dev/null
27
 
28
  # Install OpenCode
29
  RUN npm install -g opencode-ai
30
 
31
- # No-op xdg-open shim (opencode web tries to open browser; container is headless)
32
  RUN printf '#!/bin/sh\nexit 0\n' > /usr/local/bin/xdg-open && chmod +x /usr/local/bin/xdg-open
33
 
34
  WORKDIR /home/node
35
  COPY --chown=node:node start.sh /home/node/start.sh
36
  COPY --chown=node:node opencode.json.example /home/node/opencode.json.example
37
 
38
- # Safety: strip CRLF if any
39
  RUN sed -i 's/\r$//' /home/node/start.sh && chmod +x /home/node/start.sh
40
 
41
  USER node
 
1
  FROM node:20-slim
2
 
 
 
 
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
  ca-certificates \
5
  bash \
 
12
  python3-venv \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Install Hugging Face CLI (`hf`) using the official installer (creates its own venv)
16
+ # Put the hf binary into /usr/local/bin so it's in PATH for user 'node'
 
17
  ENV HF_CLI_BIN_DIR=/usr/local/bin
18
  RUN curl -LsSf https://hf.co/cli/install.sh | bash -s -- --no-modify-path
19
 
20
+ RUN hf version
 
21
 
22
  # Install OpenCode
23
  RUN npm install -g opencode-ai
24
 
25
+ # No-op xdg-open shim
26
  RUN printf '#!/bin/sh\nexit 0\n' > /usr/local/bin/xdg-open && chmod +x /usr/local/bin/xdg-open
27
 
28
  WORKDIR /home/node
29
  COPY --chown=node:node start.sh /home/node/start.sh
30
  COPY --chown=node:node opencode.json.example /home/node/opencode.json.example
31
 
 
32
  RUN sed -i 's/\r$//' /home/node/start.sh && chmod +x /home/node/start.sh
33
 
34
  USER node