File size: 927 Bytes
eeba85e ddd4abe eeba85e ddd4abe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | # 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"] |