Kgshop commited on
Commit
7d034ae
·
verified ·
1 Parent(s): f05d1ec

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive \
4
+ HOME=/root \
5
+ PATH=/root/.opencode/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/sbin:/bin \
6
+ PORT=7860
7
+
8
+ # Runtime deps: curl/unzip for the installer, git + ripgrep for the agent.
9
+ RUN apt-get update && apt-get install -y --no-install-recommends \
10
+ curl ca-certificates git unzip bash jq ripgrep \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ WORKDIR /app
14
+
15
+ COPY requirements.txt /app/requirements.txt
16
+ RUN pip install --no-cache-dir -r /app/requirements.txt
17
+
18
+ # Install the prebuilt opencode binary (linux-x64 / linux-arm64).
19
+ RUN curl -fsSL https://opencode.ai/install | bash
20
+
21
+ COPY app.py /app/app.py
22
+ RUN chmod -R 777 /app
23
+
24
+ # Workspace used as the agent's project directory.
25
+ RUN mkdir -p /app/workspace && chmod -R 777 /app/workspace
26
+ WORKDIR /app/workspace
27
+
28
+ EXPOSE 7860
29
+ CMD ["python", "/app/app.py"]