Spaces:
Sleeping
Sleeping
| 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"] | |