File size: 892 Bytes
11a8435
bd115b3
11a8435
 
 
bd115b3
11a8435
 
bd115b3
11a8435
 
 
 
bd115b3
04b8006
11a8435
 
bd115b3
 
11a8435
bd115b3
 
df660ab
bd115b3
d680a4d
bd115b3
df660ab
11a8435
 
bd115b3
df660ab
11a8435
bd115b3
df660ab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright (c) 2026 Meta Platforms, Inc. and affiliates.
# Dockerfile for MedTriage Environment - Optimized for Hugging Face

FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Install system dependencies (curl is required for health check)
RUN apt-get update && apt-get install -y --no-install-recommends \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Pre-install core dependencies to speed up build
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application
COPY . .

# Set environment variables
ENV PYTHONPATH="/app"
ENV PORT=8002
ENV HOST=0.0.0.0

# Expose the app port
EXPOSE 8002

# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
    CMD curl -f http://localhost:8002/health || exit 1

# Start the server
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8002"]