chore: remove infra files managed by hub monorepo
Dockerfile, docker-compose.yml, llm-api.yml, and traefik-router.yaml are now managed centrally in asepharyana-hub's infra/ directory.
This commit is contained in:
-43
@@ -1,43 +0,0 @@
|
||||
# ── Build stage: cargo-chef ──
|
||||
FROM lukemathwalker/cargo-chef:latest-rust-1.89.0 AS chef
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libclang-dev cmake && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /app
|
||||
|
||||
FROM chef AS planner
|
||||
COPY . .
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
FROM chef AS builder
|
||||
COPY --from=planner /app/recipe.json recipe.json
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/app/target \
|
||||
cargo chef cook --release --recipe-path recipe.json
|
||||
|
||||
COPY . .
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/app/target \
|
||||
cargo build --release && \
|
||||
cp target/release/llm-api /app/llm-api
|
||||
|
||||
# ── Runtime image ──
|
||||
FROM debian:bookworm-slim AS runtime
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libssl3 \
|
||||
libgomp1 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN groupadd -g 1001 appgroup && \
|
||||
useradd -u 1001 -g appgroup -s /bin/sh appuser
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/llm-api /app/llm-api
|
||||
|
||||
# Model will be mounted at runtime
|
||||
RUN mkdir -p /root/models/gguf && chown -R appuser:appgroup /root/models/gguf
|
||||
|
||||
USER appuser
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["./llm-api"]
|
||||
@@ -1,27 +0,0 @@
|
||||
services:
|
||||
llm-api:
|
||||
container_name: llm-api
|
||||
image: ghcr.io/asepharyana/llm-api:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: always
|
||||
networks:
|
||||
app-shared-net:
|
||||
aliases:
|
||||
- llm-api
|
||||
volumes:
|
||||
- /root/models/gguf:/root/models/gguf:ro
|
||||
environment:
|
||||
- MODEL_PATH=/root/models/gguf/MiniCPM-V-4.6-Q4_K_M.gguf
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'curl -so /dev/null --connect-timeout 5 http://localhost:8080/health || test $? -eq 22']
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
|
||||
networks:
|
||||
app-shared-net:
|
||||
name: app-shared-net
|
||||
external: true
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
services:
|
||||
llm-api:
|
||||
container_name: llm-api
|
||||
image: ghcr.io/asepharyana/llm-api:latest
|
||||
restart: always
|
||||
depends_on:
|
||||
nats:
|
||||
condition: service_started
|
||||
networks:
|
||||
app-shared-net:
|
||||
aliases:
|
||||
- llm-api
|
||||
volumes:
|
||||
- /root/models/gguf:/root/models/gguf:ro
|
||||
environment:
|
||||
- MODEL_PATH=/root/models/gguf/MiniCPM-V-4.6-Q4_K_M.gguf
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'curl -so /dev/null --connect-timeout 5 http://localhost:8080/health || test $? -eq 22']
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
labels:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8080"
|
||||
prometheus.io/path: "/metrics"
|
||||
|
||||
networks:
|
||||
app-shared-net:
|
||||
name: app-shared-net
|
||||
external: true
|
||||
@@ -1,16 +0,0 @@
|
||||
http:
|
||||
routers:
|
||||
llm-api:
|
||||
rule: 'Host(`ai.asepharyana.my.id`) || Host(`ai.asepharyana.web.id`)'
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls: {}
|
||||
middlewares:
|
||||
- common-chain@file
|
||||
service: llm-api-service
|
||||
|
||||
services:
|
||||
llm-api-service:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://llm-api:8080'
|
||||
Reference in New Issue
Block a user