Spaces:
Runtime error
Runtime error
Download Dockerfile from kazukaraya12/Grok-OpenAI-API: direct link, hf CLI and curl.
- Browser
- Download file 601 Bytes
-
https://huggingface.co/spaces/kazukaraya12/Grok-OpenAI-API/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/kazukaraya12/Grok-OpenAI-API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/kazukaraya12/Grok-OpenAI-API/resolve/main/Dockerfile
601 Bytes
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install git to clone the repo | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| # Clone the Grok-Api repository | |
| RUN git clone https://github.com/realasfngl/Grok-Api.git . | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| RUN pip install --no-cache-dir fastapi uvicorn pydantic sse-starlette | |
| # Copy our custom OpenAI wrapper | |
| COPY openai_server.py /app/openai_server.py | |
| # Hugging Face runs on port 7860 | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "openai_server:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"] | |