premo625 commited on
Commit
19165a3
·
verified ·
1 Parent(s): 11acb75

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -38
Dockerfile CHANGED
@@ -1,38 +1,38 @@
1
- FROM python:3.10-slim
2
-
3
- WORKDIR /app
4
-
5
- # Install system dependencies for numpy, pandas, PIL, etc.
6
- RUN apt-get update && \
7
- apt-get install -y --no-install-recommends \
8
- build-essential \
9
- libglib2.0-0 \
10
- libsm6 \
11
- libxext6 \
12
- libxrender-dev \
13
- gcc \
14
- git \
15
- wget \
16
- curl \
17
- && apt-get clean && rm -rf /var/lib/apt/lists/*
18
-
19
- # Set environment variables for UTF-8 and production
20
- ENV PYTHONUNBUFFERED=1 \
21
- PYTHONDONTWRITEBYTECODE=1 \
22
- LC_ALL=C.UTF-8 \
23
- LANG=C.UTF-8
24
-
25
- COPY requirements.txt ./
26
- RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
27
-
28
- COPY . .
29
-
30
- # Expose the port for Hugging Face Spaces
31
- EXPOSE 7860
32
-
33
- # Healthcheck (optional, but recommended for cloud)
34
- HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
35
- CMD curl --fail http://localhost:7860/docs || exit 1
36
-
37
- # Use python -m uvicorn for reliability
38
- CMD ["python", "-m", "uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies for numpy, pandas, PIL, etc.
6
+ RUN apt-get update && \
7
+ apt-get install -y --no-install-recommends \
8
+ build-essential \
9
+ libglib2.0-0 \
10
+ libsm6 \
11
+ libxext6 \
12
+ libxrender-dev \
13
+ gcc \
14
+ git \
15
+ wget \
16
+ curl \
17
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
18
+
19
+ # Set environment variables for UTF-8 and production
20
+ ENV PYTHONUNBUFFERED=1 \
21
+ PYTHONDONTWRITEBYTECODE=1 \
22
+ LC_ALL=C.UTF-8 \
23
+ LANG=C.UTF-8
24
+
25
+ COPY requirements.txt ./
26
+ RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
27
+
28
+ COPY . .
29
+
30
+ # Expose the port for Hugging Face Spaces
31
+ EXPOSE 7860
32
+
33
+ # Healthcheck (optional, but recommended for cloud)
34
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
35
+ CMD curl --fail http://localhost:7860/docs || exit 1
36
+
37
+ # Use python -m uvicorn for reliability
38
+ CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]