File size: 601 Bytes
613e0ea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bb960b6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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"]