File size: 550 Bytes
521aec0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.10-slim

# Install system dependencies, Git, and Node.js
RUN apt-get update && apt-get install -y curl git npm

# Install OpenCode CLI globally
RUN npm install -g opencode-ai

# Set up the working directory
WORKDIR /app

# Install Python API dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the API logic into the container
COPY main.py .

# Expose port 7860 (Hugging Face standard)
EXPOSE 7860

# Start the FastAPI server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]