feat: add mtran ROS2 translation service

This commit is contained in:
2026-07-30 19:34:49 +08:00
parent 0c09a97e7f
commit 8de4e20046
400 changed files with 137442 additions and 0 deletions

35
src/mtran/vendor/mtranserver/Dockerfile vendored Normal file
View File

@@ -0,0 +1,35 @@
FROM oven/bun:1 AS builder
WORKDIR /app
ARG VERSION
ENV VERSION=${VERSION}
COPY package.json bun.lock ./
RUN --mount=type=cache,target=/root/.bun/install/cache \
bun install --frozen-lockfile
COPY ui/package.json ui/bun.lock ./ui/
RUN --mount=type=cache,target=/root/.bun/install/cache \
cd ui && bun install --frozen-lockfile
COPY . .
RUN if [ -z "$VERSION" ]; then VERSION=$(bun -p "require('./package.json').version"); fi; \
bun run bump "$VERSION"
RUN --mount=type=cache,target=/root/.bun/install/cache \
bun run build:node
FROM node:22-alpine
WORKDIR /app
COPY --from=builder /app/dist ./
ENV MT_HOST=0.0.0.0 \
MT_PORT=8989 \
NODE_ENV=production
EXPOSE 8989
CMD ["node", "main.js"]