Spaces:
Runtime error
Runtime error
Download Dockerfile from kazukaraya12/opencode-api: direct link, hf CLI and curl.
- Browser
- Download file 550 Bytes
-
https://huggingface.co/spaces/kazukaraya12/opencode-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/kazukaraya12/opencode-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/kazukaraya12/opencode-api/resolve/main/Dockerfile
550 Bytes
| 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"] |