Download Dockerfile from archnemix-ffmpeg-polyglot/ffmpeg-rust: direct link, hf CLI and curl.
- Browser
- Download file 1.34 kB
-
https://huggingface.co/spaces/archnemix-ffmpeg-polyglot/ffmpeg-rust/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/archnemix-ffmpeg-polyglot/ffmpeg-rust/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/archnemix-ffmpeg-polyglot/ffmpeg-rust/resolve/main/Dockerfile
1.34 kB
| # ArchNemix FFmpeg Backend - Rust v5.1.0 | |
| # HuggingFace Spaces Dockerfile | |
| FROM rust:1.85-slim-bullseye AS builder | |
| # Install build dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| pkg-config \ | |
| libssl-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create app directory | |
| WORKDIR /app | |
| # Copy manifests | |
| COPY Cargo.toml ./ | |
| # Copy source code (main.rs in root) | |
| COPY main.rs ./ | |
| # Build for release (optimized binary) | |
| RUN cargo build --release | |
| # ============================================================================= | |
| # Runtime Stage | |
| # ============================================================================= | |
| FROM debian:bullseye-slim | |
| # Install runtime dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Verify FFmpeg installation | |
| RUN ffmpeg -version && ffprobe -version | |
| # Create app directory | |
| WORKDIR /app | |
| # Copy compiled binary from builder | |
| COPY --from=builder /app/target/release/archnemix-ffmpeg-rust /app/archnemix-ffmpeg-rust | |
| # Create required directories | |
| RUN mkdir -p /tmp/audio /tmp/out /tmp/jobs /tmp/clients /tmp/hf_cache && \ | |
| chmod -R 777 /tmp | |
| # Expose port (HuggingFace Spaces standard) | |
| EXPOSE 7860 | |
| # Set environment variables | |
| ENV RUST_LOG=info \ | |
| PORT=7860 | |
| # Run the application | |
| CMD ["/app/archnemix-ffmpeg-rust"] |