hello-ram commited on
Commit
08ef677
·
verified ·
1 Parent(s): 00c173d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -17
Dockerfile CHANGED
@@ -1,27 +1,12 @@
1
- # Use lightweight Python base image
2
  FROM python:3.10-slim
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies
8
- RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
9
-
10
- # Copy only requirements first (for caching)
11
  COPY requirements.txt .
 
12
 
13
- # Install Python dependencies
14
- RUN pip install --upgrade pip && \
15
- pip install --no-cache-dir -r requirements.txt
16
-
17
- # Copy application code
18
  COPY . .
19
 
20
- # Hugging Face cache directory (writable in Spaces)
21
- ENV HF_HOME=/tmp
22
-
23
- # Expose Space default port
24
  EXPOSE 7860
25
 
26
- # Start FastAPI app
27
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
 
 
 
 
5
  COPY requirements.txt .
6
+ RUN pip install --no-cache-dir -r requirements.txt
7
 
 
 
 
 
 
8
  COPY . .
9
 
 
 
 
 
10
  EXPOSE 7860
11
 
12
+ CMD ["python", "app.py"]