CreativeEngineer Claude Opus 4.6 commited on
Commit
cd1dff0
·
1 Parent(s): f238af4

fix: quote pip version specs in Dockerfile, add cpu-upgrade

Browse files

Shell interprets >= as redirect without quotes. Also add
ENABLE_WEB_INTERFACE=true and libgomp1 for runtime.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. server/Dockerfile +16 -29
server/Dockerfile CHANGED
@@ -1,40 +1,27 @@
1
- FROM python:3.12-slim AS builder
2
-
3
- WORKDIR /app
4
-
5
- RUN apt-get update && \
6
- apt-get install -y --no-install-recommends git curl && \
7
- rm -rf /var/lib/apt/lists/*
8
-
9
- COPY . /app/env
10
-
11
- WORKDIR /app/env
12
-
13
- RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
14
- mv /root/.local/bin/uv /usr/local/bin/uv && \
15
- mv /root/.local/bin/uvx /usr/local/bin/uvx
16
-
17
- RUN --mount=type=cache,target=/root/.cache/uv \
18
- uv sync --frozen --no-install-project --no-editable
19
-
20
- RUN --mount=type=cache,target=/root/.cache/uv \
21
- uv sync --frozen --no-editable
22
-
23
  FROM python:3.12-slim
24
 
25
- WORKDIR /app
26
 
27
  RUN apt-get update && \
28
- apt-get install -y --no-install-recommends curl && \
29
  rm -rf /var/lib/apt/lists/*
30
 
31
- COPY --from=builder /app/env/.venv /app/.venv
32
- COPY --from=builder /app/env /app/env
 
 
 
 
 
 
 
33
 
34
- ENV PATH="/app/.venv/bin:$PATH"
35
  ENV PYTHONPATH="/app/env:$PYTHONPATH"
 
 
 
36
 
37
- HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
38
  CMD curl -f http://localhost:8000/health || exit 1
39
 
40
- CMD ["sh", "-c", "cd /app/env && uvicorn server.app:app --host 0.0.0.0 --port 8000"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  FROM python:3.12-slim
2
 
3
+ WORKDIR /app/env
4
 
5
  RUN apt-get update && \
6
+ apt-get install -y --no-install-recommends git curl libgomp1 && \
7
  rm -rf /var/lib/apt/lists/*
8
 
9
+ RUN pip install --no-cache-dir \
10
+ constellaration \
11
+ "fastapi>=0.115.0" \
12
+ "numpy>=2.0.0" \
13
+ "openenv-core[core]>=0.2.1" \
14
+ "pydantic>=2.10.0" \
15
+ "uvicorn>=0.34.0"
16
+
17
+ COPY . /app/env
18
 
 
19
  ENV PYTHONPATH="/app/env:$PYTHONPATH"
20
+ ENV ENABLE_WEB_INTERFACE=true
21
+
22
+ EXPOSE 8000
23
 
24
+ HEALTHCHECK --interval=60s --timeout=10s --start-period=30s --retries=3 \
25
  CMD curl -f http://localhost:8000/health || exit 1
26
 
27
+ CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"]