Spaces:
Running
Running
File size: 960 Bytes
f10f153 1e7c37c f10f153 5a96989 f10f153 1e7c37c f10f153 5a96989 1e7c37c 5a96989 f10f153 1e7c37c f10f153 5a96989 f10f153 1e7c37c 0ea2813 f10f153 5a96989 f10f153 5a96989 f10f153 | 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 | FROM python:3.11-slim
WORKDIR /app
# System deps
RUN apt-get update && apt-get install -y \
git \
curl \
ca-certificates \
wget \
&& rm -rf /var/lib/apt/lists/*
# opencode CLI – robust mit curl + retry
RUN set -eux; \
for i in 1 2 3; do \
echo "Downloading opencode v1.3.17 (attempt $i)..." ; \
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; \
done; \
dpkg -i opencode.deb || apt-get install -f -y; \
rm -f opencode.deb; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*; \
echo "== opencode version =="; opencode --version || true
# Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# App code (dockerignore beachten)
COPY . /app
# Workspace
RUN mkdir -p /workspace
EXPOSE 7860
ENV HF_SPACE=true PORT=7860
CMD ["python", "app.py"]
|