Skip to content

Commit 57c249b

Browse files
committed
Update UI
1 parent d513f90 commit 57c249b

10 files changed

Lines changed: 1222 additions & 381 deletions

File tree

Dockerfile.new

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# ── Stage 1: Build React UI ────────────────────────────────────────────────────
2+
FROM node:20-slim AS ui-builder
3+
WORKDIR /ui
4+
COPY frontend/omnibioai-model-registry-ui/package*.json ./
5+
RUN npm ci
6+
COPY frontend/omnibioai-model-registry-ui/ ./
7+
RUN npm run build
8+
9+
# ── Stage 2: Python API + nginx ───────────────────────────────────────────────
10+
FROM python:3.12-slim
11+
LABEL org.opencontainers.image.source=https://github.com/man4ish/omnibioai
12+
13+
RUN apt-get update && apt-get install -y --no-install-recommends \
14+
nginx && rm -rf /var/lib/apt/lists/*
15+
16+
WORKDIR /app
17+
COPY pyproject.toml .
18+
RUN pip install --no-cache-dir -U pip && pip install --no-cache-dir .
19+
COPY omnibioai_model_registry/ ./omnibioai_model_registry/
20+
21+
COPY --from=ui-builder /ui/dist /usr/share/nginx/html
22+
23+
RUN printf 'server {\n\
24+
listen 5176;\n\
25+
root /usr/share/nginx/html;\n\
26+
index index.html;\n\
27+
location / { try_files $uri $uri/ /index.html; }\n\
28+
location /v1/ { proxy_pass http://127.0.0.1:8095; proxy_set_header Host $host; }\n\
29+
location /health { proxy_pass http://127.0.0.1:8095; }\n\
30+
location /docs { proxy_pass http://127.0.0.1:8095; }\n\
31+
}\n' > /etc/nginx/sites-available/default
32+
33+
ENV HOST=0.0.0.0 PORT=8095 PYTHONUNBUFFERED=1
34+
ENV MODEL_REGISTRY_APP=omnibioai_model_registry.service.app.main:app
35+
EXPOSE 8095 5176
36+
CMD ["bash", "-c", "nginx && python -m uvicorn omnibioai_model_registry.service.app.main:app --host 0.0.0.0 --port 8095"]

0 commit comments

Comments
 (0)