-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (31 loc) · 1.27 KB
/
Dockerfile
File metadata and controls
43 lines (31 loc) · 1.27 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
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
# Install dependencies first — this layer only rebuilds when pyproject.toml changes
COPY pyproject.toml ./
RUN uv venv venv --python 3.11 --clear
ENV VIRTUAL_ENV="/app/venv"
ENV PATH="/app/venv/bin:$PATH"
ENV PYTHONPATH="/app"
RUN uv pip install ".[all]" || true
# Copy the rest of the source — only this layer rebuilds on code changes
COPY . /app/
RUN git submodule update --init --recursive || true
# Re-install in editable mode now that source is present
RUN uv pip install -e ".[all]"
RUN if [ -f "./mini-swe-agent/pyproject.toml" ]; then uv pip install -e "./mini-swe-agent"; fi
RUN useradd -m -d /home/logos -u 10001 logos \
&& mkdir -p /home/logos/.logos/{cron,sessions,logs,memories,skills,pairing,hooks,image_cache,audio_cache,whatsapp/session} \
&& chown -R 10001:10001 /home/logos
ENV HOME=/home/logos
# Build-time SHA baked in — passed via: docker buildx build --build-arg BUILD_SHA=$(git rev-parse --short HEAD)
ARG BUILD_SHA=unknown
ENV BUILD_SHA=${BUILD_SHA}
EXPOSE 8080
CMD ["logos", "gateway", "run"]