Add custom Dockerfile for Tengu build

This commit is contained in:
Adam Ladachowski
2026-02-14 08:54:39 +01:00
parent c6da517b08
commit a20ec2885e
3 changed files with 45 additions and 2 deletions
+15
View File
@@ -0,0 +1,15 @@
.git
.venv
.pytest_cache
.mypy_cache
.ruff_cache
__pycache__
*.pyc
*.pyo
*.egg-info
dist
build
.coverage
htmlcov
screenshots
tensors/server/ui/node_modules
+29
View File
@@ -0,0 +1,29 @@
# Build stage
FROM saiden/tengu:python-3.12-dev AS builder
WORKDIR /app
# Copy everything needed for the package
COPY . .
# Install dependencies and package
RUN uv pip install --system -e '.[server]'
# Runtime stage
FROM saiden/tengu:python-3.12
WORKDIR /app
# Copy installed packages from builder
COPY --from=builder /usr/local/lib/python3.12 /usr/local/lib/python3.12
COPY --from=builder /usr/local/bin /usr/local/bin
# Copy app source
COPY --from=builder /app /app
# Set environment
ENV PATH="/usr/local/bin:$PATH"
EXPOSE 5000
CMD ["tsr", "serve", "--host", "0.0.0.0", "--port", "5000", "--sd-server", "http://172.17.0.1:1234"]
+1 -2
View File
@@ -1,4 +1,3 @@
runtime: python runtime: python
build_cmd: uv pip install --system -r requirements.txt && uv pip install --system -e '.[server]' dockerfile: Dockerfile
cmd: tsr serve --host 0.0.0.0 --port 5000 --sd-server http://172.17.0.1:1234
port: 5000 port: 5000