mohammedafeef commited on
Commit
d09d352
·
verified ·
1 Parent(s): 7367704

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -15
Dockerfile CHANGED
@@ -1,25 +1,17 @@
1
- # ---- Base Image ----
2
  FROM python:3.10-slim
3
 
4
- # ---- System Dependencies ----
5
- RUN apt-get update && apt-get install -y \
6
- libgl1 libglib2.0-0 \
7
- && rm -rf /var/lib/apt/lists/*
8
 
9
- # ---- Working Directory ----
10
  WORKDIR /app
11
-
12
- # ---- Copy Files ----
13
  COPY requirements.txt .
14
- COPY app.py .
15
- COPY best.pt .
16
-
17
- # ---- Install Python Dependencies ----
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
- # ---- Environment Variables ----
21
- ENV PORT=7860
 
22
  EXPOSE 7860
23
 
24
- # ---- Start Flask App ----
25
  CMD ["python", "app.py"]
 
1
+ # Use lightweight Python image with CUDA support (if needed)
2
  FROM python:3.10-slim
3
 
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/*
 
 
6
 
7
+ # Copy app
8
  WORKDIR /app
 
 
9
  COPY requirements.txt .
 
 
 
 
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
+ COPY . .
13
+
14
+ # Expose Flask port
15
  EXPOSE 7860
16
 
 
17
  CMD ["python", "app.py"]