SamSankar commited on
Commit
d10ea62
·
verified ·
1 Parent(s): f3e8e53

Upload server/Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. server/Dockerfile +30 -30
server/Dockerfile CHANGED
@@ -1,30 +1,30 @@
1
- # HallucinationGuard-Env Dockerfile
2
- FROM python:3.10-slim
3
-
4
- WORKDIR /app
5
-
6
- # Install system dependencies (curl needed for HEALTHCHECK)
7
- RUN apt-get update && apt-get install -y \
8
- gcc \
9
- curl \
10
- && rm -rf /var/lib/apt/lists/*
11
-
12
- # Install Python dependencies first (better layer caching)
13
- COPY server/requirements.txt .
14
- RUN pip install --no-cache-dir -r requirements.txt
15
-
16
- # Copy application code
17
- COPY . .
18
-
19
- # Install the package in editable mode
20
- RUN pip install -e .
21
-
22
- # HF Spaces Docker default port is 7860 — match it so no app_port override needed
23
- EXPOSE 7860
24
-
25
- # Health check so HF Spaces knows when the container is truly ready
26
- HEALTHCHECK --interval=15s --timeout=10s --start-period=120s --retries=6 \
27
- CMD curl -f http://localhost:7860/health || exit 1
28
-
29
- # Run on port 7860 to match HF Spaces default
30
- CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # HallucinationGuard-Env Dockerfile
2
+ FROM python:3.10-slim
3
+
4
+ WORKDIR /app
5
+
6
+ # Install system dependencies (curl needed for HEALTHCHECK)
7
+ RUN apt-get update && apt-get install -y \
8
+ gcc \
9
+ curl \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Install Python dependencies first (better layer caching)
13
+ COPY server/requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy application code
17
+ COPY . .
18
+
19
+ # Install the package in editable mode
20
+ RUN pip install -e .
21
+
22
+ # HF Spaces Docker default port is 7860 — match it so no app_port override needed
23
+ EXPOSE 7860
24
+
25
+ # Health check so HF Spaces knows when the container is truly ready
26
+ HEALTHCHECK --interval=15s --timeout=10s --start-period=120s --retries=6 \
27
+ CMD curl -f http://localhost:7860/health || exit 1
28
+
29
+ # Run on port 7860 to match HF Spaces default
30
+ CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]