OpenSIN-AI commited on
Commit
3c78aaf
·
1 Parent(s): b3dc498

fix: use opencode CLI binary instead of desktop deb (CONFIG_ERROR fix)

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -20
Dockerfile CHANGED
@@ -2,41 +2,30 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # System deps + wget
6
  RUN apt-get update && apt-get install -y \
7
- git \
8
- curl \
9
- ca-certificates \
10
- wget \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # opencode CLI robust mit curl + retry
14
  RUN set -eux; \
15
  for i in 1 2 3; do \
16
- echo "Downloading opencode v1.3.17 (attempt $i)..." ; \
17
- curl -fL --retry 3 --retry-delay 2 -o opencode.deb "https://github.com/anomalyco/opencode/releases/download/v1.3.17/opencode-desktop-linux-amd64.deb" && break || sleep 5; \
18
  done; \
19
- dpkg -i opencode.deb || apt-get install -f -y; \
20
- rm -f opencode.deb; \
21
- apt-get clean; \
22
- rm -rf /var/lib/apt/lists/*; \
23
  echo "== opencode version =="; opencode --version || true
24
 
25
- # Python deps
26
  COPY requirements.txt .
27
  RUN pip install --no-cache-dir -r requirements.txt
28
 
29
- # App Code (achtet .dockerignore)
30
  COPY . /app
31
-
32
- # Fix permissions for entrypoint
33
  RUN chmod +x /app/start.sh
34
-
35
- # Workspace
36
  RUN mkdir -p /workspace
37
 
38
  EXPOSE 7860
39
  ENV HF_SPACE=true PORT=7860
40
-
41
- # Use start.sh as entrypoint (sets up opencode config, then execs uvicorn)
42
  ENTRYPOINT ["/app/start.sh"]
 
 
2
 
3
  WORKDIR /app
4
 
5
+ # System deps
6
  RUN apt-get update && apt-get install -y \
7
+ git curl ca-certificates \
 
 
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
+ # opencode CLI binary (NOT desktop deb!)
11
  RUN set -eux; \
12
  for i in 1 2 3; do \
13
+ echo "Downloading opencode CLI v1.3.17 (attempt $i)..."; \
14
+ curl -fL --retry 3 --retry-delay 2 -o opencode.tar.gz "https://github.com/anomalyco/opencode/releases/download/v1.3.17/opencode-linux-amd64.tar.gz" && break || sleep 5; \
15
  done; \
16
+ tar -xzf opencode.tar.gz -C /usr/local/bin opencode; \
17
+ rm -f opencode.tar.gz; \
18
+ chmod +x /usr/local/bin/opencode; \
 
19
  echo "== opencode version =="; opencode --version || true
20
 
 
21
  COPY requirements.txt .
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
 
24
  COPY . /app
 
 
25
  RUN chmod +x /app/start.sh
 
 
26
  RUN mkdir -p /workspace
27
 
28
  EXPOSE 7860
29
  ENV HF_SPACE=true PORT=7860
 
 
30
  ENTRYPOINT ["/app/start.sh"]
31
+