-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (46 loc) · 1.79 KB
/
Copy pathDockerfile
File metadata and controls
57 lines (46 loc) · 1.79 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
# 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: Environment-specific system packages
##########################################################
RUN apt-get update && apt-get install -y \
git-lfs \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
##########################################################
## Layer 2: Copy and install taiga-core + environment
##########################################################
COPY --from=taiga taiga-core ./taiga-core
COPY . ./examples/dmcc
RUN uv pip install --system -e ./taiga-core && \
uv pip install --system -e ./examples/dmcc
RUN uv run dmcc hello
WORKDIR ${WORKDIR}