Afifa Kureshi commited on
Commit
fb69648
·
1 Parent(s): 8c16d43

Fix Space startup health endpoint

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -5
  2. requirements.txt +4 -5
Dockerfile CHANGED
@@ -1,16 +1,16 @@
1
  FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
-
5
- # Force Python to print logs immediately (Fixes the missing logs issue!)
6
  ENV PYTHONUNBUFFERED=1
7
 
8
  COPY requirements.txt .
9
 
10
- # Add fastapi and uvicorn to your requirements during the build
11
- RUN pip install --no-cache-dir -r requirements.txt fastapi uvicorn
 
 
 
12
 
13
  COPY . .
14
 
15
- # Start the web server on Port 7860 so Hugging Face can see it
16
  CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
3
  WORKDIR /app
 
 
4
  ENV PYTHONUNBUFFERED=1
5
 
6
  COPY requirements.txt .
7
 
8
+ # ADD THIS LINE: Upgrade pip first!
9
+ RUN pip install --no-cache-dir --upgrade pip
10
+
11
+ # Then install the requirements
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
 
14
  COPY . .
15
 
 
16
  CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
requirements.txt CHANGED
@@ -1,7 +1,6 @@
1
- pyyaml
2
- openenv-core
3
  fastapi==0.110.1
4
  uvicorn==0.29.0
5
-
6
- # Data Validation (Required for OpenEnv typed models)
7
- pydantic==2.6.4
 
 
 
 
1
  fastapi==0.110.1
2
  uvicorn==0.29.0
3
+ pydantic==2.6.4
4
+ typer==0.12.3
5
+ openenv-core==0.1.0
6
+ openai==1.14.3