abdullahalioo commited on
Commit
b9c41b6
·
verified ·
1 Parent(s): 6651cff

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -2
Dockerfile CHANGED
@@ -1,10 +1,16 @@
1
  FROM python:3.10
2
 
 
3
  WORKDIR /app
4
 
 
5
  COPY requirements.txt .
6
- RUN pip install -r requirements.txt
7
 
 
 
 
 
8
  COPY . .
9
 
10
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10
2
 
3
+ # Set working directory inside container
4
  WORKDIR /app
5
 
6
+ # Copy requirements first (for faster build cache)
7
  COPY requirements.txt .
 
8
 
9
+ # Install Python dependencies
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Copy the entire project into container
13
  COPY . .
14
 
15
+ # Run FastAPI with uvicorn
16
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]