File size: 956 Bytes
9b47159
 
 
 
 
 
 
 
 
 
 
 
 
 
48b0373
9b47159
0135a17
48b0373
 
 
 
0135a17
9b47159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
37
38
39
FROM python:3.11-slim

LABEL maintainer="bug-triage-openenv"
LABEL description="Bug Triage OpenEnv Environment"

# Install curl for healthcheck
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Install dependencies first (cached layer)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy all required files
COPY bug_triage_env/ ./bug_triage_env/
COPY server/ ./server/
COPY openenv.yaml .
COPY inference.py .
COPY README.md .
COPY pyproject.toml .
COPY uv.lock .

# Expose OpenEnv standard port
EXPOSE 8000

# Environment variables
ENV PORT=8000
ENV HOST=0.0.0.0
ENV WORKERS=4
ENV OPENAI_API_KEY=""
ENV GEMINI_API_KEY=""

# Health check
HEALTHCHECK --interval=15s --timeout=5s --retries=3 \
  CMD curl -f http://localhost:${PORT}/health || exit 1

CMD ["sh", "-c", "uvicorn bug_triage_env.server.app:app --host ${HOST} --port ${PORT} --workers ${WORKERS}"]