aiengrimran commited on
Commit
8d61c9a
·
1 Parent(s): 4630e04

updater docker issue

Browse files
Files changed (3) hide show
  1. .gitignore +2 -1
  2. Dockerfile +13 -3
  3. requirements.txt +47 -0
.gitignore CHANGED
@@ -1,2 +1,3 @@
1
  __pycache__
2
- .vscode
 
 
1
  __pycache__
2
+ .vscode
3
+ .python-version
Dockerfile CHANGED
@@ -1,15 +1,25 @@
1
- FROM python:311-slim
2
-
3
 
 
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
  libgl1 \
6
  libglib2.0-0 \
7
  && rm -rf /var/lib/apt/lists/*
8
 
 
9
  WORKDIR /app
10
- RUN pip install --no-cache-dir -r requirements.txt
11
 
 
12
  COPY requirements.txt .
 
 
 
 
 
 
 
 
13
  EXPOSE 7860
14
 
 
15
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.11-slim
 
2
 
3
+ # Install system dependencies (needed for OpenCV, torch, etc.)
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
  libgl1 \
6
  libglib2.0-0 \
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
+ # Set working directory
10
  WORKDIR /app
 
11
 
12
+ # Copy requirements first (for better caching)
13
  COPY requirements.txt .
14
+
15
+ # Install Python dependencies
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # Copy the rest of the app code
19
+ COPY . .
20
+
21
+ # Expose the Hugging Face port
22
  EXPOSE 7860
23
 
24
+ # Run the FastAPI app
25
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
requirements.txt ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ annotated-doc==0.0.3
2
+ annotated-types==0.7.0
3
+ anyio==4.11.0
4
+ certifi==2025.10.5
5
+ charset-normalizer==3.4.4
6
+ click==8.3.0
7
+ contourpy==1.3.3
8
+ cycler==0.12.1
9
+ fastapi==0.120.2
10
+ filelock==3.20.0
11
+ fonttools==4.60.1
12
+ fsspec==2025.9.0
13
+ h11==0.16.0
14
+ idna==3.11
15
+ Jinja2==3.1.6
16
+ kiwisolver==1.4.9
17
+ MarkupSafe==3.0.3
18
+ matplotlib==3.10.7
19
+ mpmath==1.3.0
20
+ networkx==3.5
21
+ numpy==1.26.4
22
+ opencv-python==4.12.0.88
23
+ packaging==25.0
24
+ pillow==12.0.0
25
+ polars==1.34.0
26
+ polars-runtime-32==1.34.0
27
+ psutil==7.1.2
28
+ pydantic==2.12.3
29
+ pydantic_core==2.41.4
30
+ pyparsing==3.2.5
31
+ python-dateutil==2.9.0.post0
32
+ python-multipart==0.0.20
33
+ PyYAML==6.0.3
34
+ requests==2.32.5
35
+ scipy==1.16.3
36
+ six==1.17.0
37
+ sniffio==1.3.1
38
+ starlette==0.49.1
39
+ sympy==1.14.0
40
+ torch==2.2.2
41
+ torchvision==0.17.2
42
+ typing-inspection==0.4.2
43
+ typing_extensions==4.15.0
44
+ ultralytics==8.3.222
45
+ ultralytics-thop==2.0.18
46
+ urllib3==2.5.0
47
+ uvicorn==0.38.0