File size: 1,035 Bytes
66cf27f
 
 
 
440d35c
66cf27f
 
 
 
df6fa5a
 
66cf27f
 
 
 
 
 
76eacb1
 
66cf27f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.12-slim
LABEL org.opencontainers.image.title="OpenEnv Analyst Workbench"
LABEL org.opencontainers.image.description="Procedural multi-domain analysis tasks with a sandboxed python tool and exact verifiers"
LABEL org.opencontainers.image.licenses="MIT"
RUN apt-get update && apt-get install -y --no-install-recommends git tini gcc libc6-dev && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
COPY workbench /app/workbench
COPY repo_repair /app/repo_repair
COPY repo_libs /app/repo_libs
COPY server /app/server
COPY openenv.yaml README.md /app/
# The server runs as root only so the python tool can drop to `nobody`; task sources stay unreadable to it.
RUN chmod -R go-rwx /app
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
EXPOSE 8000
# tini as PID 1 reaps orphaned sandbox processes, which uvicorn would leave as zombies.
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"]