Download Dockerfile from mozolla/vi: direct link, hf CLI and curl.
- Browser
- Download file 1.29 kB
-
https://huggingface.co/spaces/mozolla/vi/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/mozolla/vi/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mozolla/vi/resolve/main/Dockerfile
1.29 kB
| FROM node:20-bookworm | |
| WORKDIR /app | |
| # Install dependencies for FFmpeg extraction and locales | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| wget \ | |
| ca-certificates \ | |
| xz-utils \ | |
| curl \ | |
| locales \ | |
| && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \ | |
| && locale-gen en_US.UTF-8 \ | |
| && update-locale LANG=en_US.UTF-8 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Use UTF-8 locales | |
| ENV LANG=en_US.UTF-8 | |
| ENV LC_ALL=en_US.UTF-8 | |
| # Download and install FFmpeg from BtbN (linux64-gpl build) | |
| RUN wget -q https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz || \ | |
| curl -L -O https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz && \ | |
| tar -xf ffmpeg-master-latest-linux64-gpl.tar.xz && \ | |
| mv ffmpeg-master-latest-linux64-gpl/bin/ffmpeg /usr/local/bin/ffmpeg && \ | |
| mv ffmpeg-master-latest-linux64-gpl/bin/ffprobe /usr/local/bin/ffprobe && \ | |
| rm -rf ffmpeg-master-latest-linux64-gpl.tar.xz ffmpeg-master-latest-linux64-gpl | |
| COPY package*.json ./ | |
| RUN npm install | |
| COPY . . | |
| RUN npm run build | |
| # Add these lines: | |
| ENV DOWNLOADS_DIR=/mnt/data/downloads | |
| ENV ENCODED_DIR=/mnt/data/encoded | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| CMD ["node", "server/index.js"] | |