# ArchNemix FFmpeg Backend - Node.js v5.1.0 # HuggingFace Spaces Dockerfile FROM node:18-bullseye # Install FFmpeg and dependencies RUN apt-get update && apt-get install -y \ ffmpeg \ curl \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Verify FFmpeg installation RUN ffmpeg -version && ffprobe -version # Set working directory WORKDIR /app # Copy package files COPY package.json package-lock.json* ./ # Install dependencies RUN npm install --production # Copy application code COPY server.js ./ # Create required directories # HuggingFace Spaces uses /data for persistent storage and /tmp for temporary files RUN mkdir -p /tmp/audio /tmp/out /tmp/jobs /tmp/clients /tmp/hf_cache && \ chmod -R 777 /tmp # HuggingFace Spaces exposes port 7860 by default EXPOSE 7860 # Run the application # HuggingFace Spaces will inject secrets as environment variables automatically CMD ["node", "server.js"]