Sushan commited on
Commit
b38308d
·
1 Parent(s): 3fabb63

Final Changes

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -4
  2. requirements.txt +6 -0
Dockerfile CHANGED
@@ -9,12 +9,13 @@ COPY app.py /app/app.py
9
  COPY best_yolov8m_model.pt /app/best_yolov8m_model.pt
10
  COPY requirements.txt /app/requirements.txt
11
 
12
- # Install required packages
13
  RUN pip install --no-cache-dir --upgrade pip && \
14
- pip install --no-cache-dir -r requirements.txt
 
15
 
16
  # Expose the port for the API
17
  EXPOSE 8000
18
 
19
- # Run FastAPI using Uvicorn
20
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
 
9
  COPY best_yolov8m_model.pt /app/best_yolov8m_model.pt
10
  COPY requirements.txt /app/requirements.txt
11
 
12
+ # Install required packages and check uvicorn installation
13
  RUN pip install --no-cache-dir --upgrade pip && \
14
+ pip install --no-cache-dir -r requirements.txt && \
15
+ uvicorn --version
16
 
17
  # Expose the port for the API
18
  EXPOSE 8000
19
 
20
+ # Alternative CMD via Python
21
+ CMD ["python3", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
requirements.txt CHANGED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ fastapi
2
+ uvicorn==0.22.0
3
+ Pillow
4
+ opencv-python-headless
5
+ torch
6
+ ultralytics