kazukaraya12 commited on
Commit
613e0ea
·
verified ·
1 Parent(s): aec3672

Create Dockefile

Browse files
Files changed (1) hide show
  1. Dockefile +21 -0
Dockefile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install git to clone the repo
6
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
7
+
8
+ # Clone the Grok-Api repository
9
+ RUN git clone https://github.com/realasfngl/Grok-Api.git .
10
+
11
+ # Install dependencies
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+ RUN pip install --no-cache-dir fastapi uvicorn pydantic sse-starlette
14
+
15
+ # Copy our custom OpenAI wrapper
16
+ COPY openai_server.py /app/openai_server.py
17
+
18
+ # Hugging Face runs on port 7860
19
+ EXPOSE 7860
20
+
21
+ CMD["uvicorn", "openai_server:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]