jefhgofk commited on
Commit
a8a6d02
·
verified ·
1 Parent(s): 26a2d1b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -13
Dockerfile CHANGED
@@ -1,34 +1,21 @@
1
- # Use lightweight Python image
2
  FROM python:3.10-slim
3
 
4
- # Prevent Python from buffering stdout/stderr
5
  ENV PYTHONDONTWRITEBYTECODE=1
6
  ENV PYTHONUNBUFFERED=1
7
 
8
- # Set working directory
9
  WORKDIR /app
10
 
11
- # Install system dependencies required by OpenCV & YOLO
12
  RUN apt-get update && apt-get install -y \
13
  libgl1 \
14
  libglib2.0-0 \
15
- libsm6 \
16
- libxext6 \
17
- libxrender-dev \
18
  ffmpeg \
19
  && rm -rf /var/lib/apt/lists/*
20
 
21
- # Copy all root files (detection.pt, app.py, requirements.txt)
22
  COPY . .
23
 
24
- # Upgrade pip
25
  RUN pip install --upgrade pip
26
-
27
- # Install Python dependencies
28
  RUN pip install --no-cache-dir -r requirements.txt
29
 
30
- # Expose HuggingFace default port
31
  EXPOSE 7860
32
 
33
- # Start FastAPI app
34
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  ENV PYTHONDONTWRITEBYTECODE=1
4
  ENV PYTHONUNBUFFERED=1
5
 
 
6
  WORKDIR /app
7
 
 
8
  RUN apt-get update && apt-get install -y \
9
  libgl1 \
10
  libglib2.0-0 \
 
 
 
11
  ffmpeg \
12
  && rm -rf /var/lib/apt/lists/*
13
 
 
14
  COPY . .
15
 
 
16
  RUN pip install --upgrade pip
 
 
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
 
19
  EXPOSE 7860
20
 
 
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]