ganeshkonapalli commited on
Commit
aa336ae
·
verified ·
1 Parent(s): 8d75fd3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -3
Dockerfile CHANGED
@@ -1,10 +1,20 @@
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
5
- COPY app/requirements.txt requirements.txt
 
 
 
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
- COPY app/ .
 
 
 
 
9
 
10
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
+ # Use a lightweight Python base image
2
  FROM python:3.10-slim
3
 
4
+ # Set working directory inside container
5
  WORKDIR /app
6
 
7
+ # Copy the requirements file
8
+ COPY requirements.txt .
9
+
10
+ # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy the rest of the app files
14
+ COPY . .
15
+
16
+ # Expose port for FastAPI (Hugging Face uses 7860 by default)
17
+ EXPOSE 7860
18
 
19
+ # Start FastAPI server
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]