subbunanepalli commited on
Commit
a0f4cd3
·
verified ·
1 Parent(s): 4060f39

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -5
Dockerfile CHANGED
@@ -1,18 +1,22 @@
1
- # Use lightweight Python image
2
  FROM python:3.9-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install dependencies
 
 
 
 
 
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # Copy everything
12
  COPY . .
13
 
14
- # Expose FastAPI port
15
  EXPOSE 7860
16
 
17
- # Run the FastAPI app
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.9-slim
2
 
3
  # Set working directory
4
  WORKDIR /app
5
 
6
+ # Install system packages
7
+ RUN apt-get update && apt-get install -y \
8
+ build-essential \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Install Python dependencies
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ # Copy app files
16
  COPY . .
17
 
18
+ # Expose port (required for Spaces or local API)
19
  EXPOSE 7860
20
 
21
+ # Run FastAPI app
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]