kazukaraya12 commited on
Commit
521aec0
·
verified ·
1 Parent(s): c3b2ac9

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Install system dependencies, Git, and Node.js
4
+ RUN apt-get update && apt-get install -y curl git npm
5
+
6
+ # Install OpenCode CLI globally
7
+ RUN npm install -g opencode-ai
8
+
9
+ # Set up the working directory
10
+ WORKDIR /app
11
+
12
+ # Install Python API dependencies
13
+ COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy the API logic into the container
17
+ COPY main.py .
18
+
19
+ # Expose port 7860 (Hugging Face standard)
20
+ EXPOSE 7860
21
+
22
+ # Start the FastAPI server
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]