Download Dockerfile from praedico/LeGuard: direct link, hf CLI and curl.
- Browser
- Download file 716 Bytes
-
https://huggingface.co/spaces/praedico/LeGuard/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/praedico/LeGuard/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/praedico/LeGuard/resolve/main/Dockerfile
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"] | |