-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
61 lines (50 loc) · 2.14 KB
/
Copy pathDockerfile
File metadata and controls
61 lines (50 loc) · 2.14 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# syntax=docker/dockerfile:1.4
FROM docker.io/ubuntu:24.04
# No internet access at runtime — install everything here
##########################################################
## Base setup: user, system packages, Python 3.12, uv, MCP server, workdir
## This section is shared across all environments — do not edit without
## updating every Dockerfile. See test_dockerfile_consistency.py.
##########################################################
RUN (userdel -r ubuntu 2>/dev/null || true) && \
(groupdel ubuntu 2>/dev/null || true) && \
groupadd -g 1000 model && \
useradd -m -u 1000 -g 1000 model && \
gpasswd -d model root || true
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
git \
sudo \
python3 \
python3-venv \
python3-dev \
python3-pip \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& rm -f /usr/lib/python3.12/EXTERNALLY-MANAGED \
&& pip install uv==0.10.9
WORKDIR /mcp_server
RUN chmod -R 0700 /mcp_server
ENV WORKDIR=/workdir
RUN mkdir -p ${WORKDIR} && chown -R model:model ${WORKDIR}
##########################################################
## Layer 1: Copy and install taiga-core + environment
##########################################################
COPY --from=taiga taiga-core ./taiga-core
COPY . ./examples/process-monitoring
RUN uv pip install --system -e ./taiga-core && \
uv pip install --system -e ./examples/process-monitoring
##########################################################
## Layer 2: tmux + task scripts
##########################################################
# tmux backs the TEST_MODE tmux tool (see taiga-core/src/taiga/tools/tmux.py).
# Task scripts live in /opt (not /mcp_server, which is unreadable to the model
# user) so the model can run them directly.
RUN apt-get update && apt-get install -y tmux && apt-get clean && rm -rf /var/lib/apt/lists/*
COPY scripts/long_job.py /opt/long_job.py
COPY scripts/status_server.py /opt/status_server.py
RUN chmod 0755 /opt/long_job.py /opt/status_server.py
RUN uv run process_monitoring hello
WORKDIR ${WORKDIR}