Shreesha1 commited on
Commit
16aecfa
·
verified ·
1 Parent(s): fa51ca9
Files changed (1) hide show
  1. Dockerfile +24 -24
Dockerfile CHANGED
@@ -1,24 +1,24 @@
1
- FROM python:3.11-slim-bookworm
2
-
3
- # System deps for OpenCV, 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
- WORKDIR /app
10
-
11
- # Install Python deps
12
- COPY requirements.txt .
13
- RUN pip install --upgrade pip && \
14
- pip install --no-cache-dir -r requirements.txt
15
-
16
- # Copy code + models
17
- COPY . .
18
-
19
- # Cloud Run will set PORT env; default to 8080 if not set
20
- ENV PORT=8080
21
- EXPOSE 8080
22
-
23
- # Use sh -c so ${PORT} is expanded by the shell
24
- CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-8080}"]
 
1
+ FROM python:3.11-slim-bookworm
2
+
3
+ # System deps for OpenCV, 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
+ WORKDIR /app
10
+
11
+ # Install Python deps
12
+ COPY requirements.txt .
13
+ RUN pip install --upgrade pip && \
14
+ pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy code + models
17
+ COPY . .
18
+
19
+ # Hugging Face Spaces expects port 7860
20
+ ENV PORT=7860
21
+ EXPOSE 7860
22
+
23
+ # Start uvicorn on port 7860
24
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]