-
-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathDockerfile
More file actions
122 lines (91 loc) · 2.63 KB
/
Dockerfile
File metadata and controls
122 lines (91 loc) · 2.63 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Use the specified standard Python 3.13.3 base image (Debian-based)
FROM python:3.13.3
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV DEBIAN_FRONTEND=noninteractive
# Set working directory
WORKDIR /app
# Install system dependencies INCLUDING systemd
RUN apt-get update && apt-get install -y --no-install-recommends \
systemd \
sudo \
curl \
iproute2 \
ffmpeg \
bash \
build-essential \
procps \
openssh-client \
openssh-server \
jq \
kmod \
cargo \
xvfb \
libnss3 \
libnspr4 \
libdbus-1-3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libxkbcommon0 \
libatspi2.0-0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libxshmfence1 \
libasound2 \
unzip \
p7zip-full \
bc \
ripgrep \
fd-find \
sqlite3 \
libsqlite3-dev \
wkhtmltopdf \
poppler-utils \
default-jre \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Upgrade pip
RUN python -m pip install --no-cache-dir --upgrade pip
# Copy requirements file
COPY ./requirements.txt /app/requirements.txt
# Install Python dependencies
RUN pip install -r requirements.txt
# Install the bash kernel spec for Jupyter (not working with uv)
RUN python -m bash_kernel.install
# Copy the application code (server.py)
COPY ./server.py /app/server.py
# Create application/jupyter directories
RUN mkdir -p /app/uploads /app/jupyter_runtime
# Copy skills directory structure into the container
# Public skills are baked into the image
# User skills directory is created as mount point for user-added skills
COPY ./skills/public /app/uploads/skills/public
RUN mkdir -p /app/uploads/skills/user
# # Generate SSH host keys
# RUN ssh-keygen -A
# Clean systemd machine-id
RUN rm -f /etc/machine-id && touch /etc/machine-id
# --- Set environment variables for the application ---
ENV FASTMCP_HOST="0.0.0.0"
ENV FASTMCP_PORT="8222"
# Expose the FastAPI port
EXPOSE 8222
# Start the FastAPI application
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8002", "--workers", "1", "--no-access-log"]
# Ensure Node.js, npm (and npx) are set up
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
RUN apt-get update && apt-get install -y nodejs
ENV PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
RUN npm install playwright@1.53.0 -g
RUN npx playwright@1.53.0 install
# Copy the entrypoint script into the image
COPY entrypoint.sh /entrypoint.sh
# Make the entrypoint script executable
RUN chmod +x /entrypoint.sh
# Use the entrypoint script
ENTRYPOINT ["/entrypoint.sh"]