File size: 922 Bytes
33fa849
7db421b
33fa849
 
 
7db421b
33fa849
 
7db421b
33fa849
 
 
 
7db421b
38c97c8
33fa849
 
7db421b
 
33fa849
7db421b
 
 
 
54cb5d8
7db421b
 
33fa849
 
7db421b
38c97c8
33fa849
7db421b
33fa849
38c97c8
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
36
# 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=7860
ENV HOST=0.0.0.0

# Expose the app port
EXPOSE 7860

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

# Start the server
ENV ENABLE_WEB_INTERFACE=true
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]