LeGuard / Dockerfile
0xPraedico
Sync Space bundle from local LeGuard
ac4ad62
Raw
History Blame Contribute Delete
716 Bytes
FROM rust:1-bookworm AS builder
WORKDIR /workspace
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
RUN cargo build -p leguard-cli --release --locked
FROM python:3.11-slim-bookworm AS runtime
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_SERVER_PORT=7860
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
COPY --from=builder /workspace/target/release/leguard /usr/local/bin/leguard
COPY app.py /app/app.py
EXPOSE 7860
CMD ["python", "/app/app.py"]