Download Dockerfile from 000x/sinhala-subtitle-hardcoder: direct link, hf CLI and curl.
- Browser
- Download file 845 Bytes
-
https://huggingface.co/spaces/000x/sinhala-subtitle-hardcoder/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/000x/sinhala-subtitle-hardcoder/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/000x/sinhala-subtitle-hardcoder/resolve/main/Dockerfile
845 Bytes
| FROM node:20-bookworm-slim | |
| # Fonts so server-side text watermarks match the browser (Sinhala included) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| fonts-liberation fonts-dejavu-core fonts-noto-core fontconfig curl ca-certificates \ | |
| && mkdir -p /usr/local/share/fonts/extra \ | |
| && (curl -fsSL "https://github.com/google/fonts/raw/main/ofl/hankengrotesk/HankenGrotesk%5Bwght%5D.ttf" \ | |
| -o /usr/local/share/fonts/extra/HankenGrotesk.ttf || echo "Hanken Grotesk skipped") \ | |
| && fc-cache -f \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY package.json ./ | |
| RUN npm install --omit=dev && npm cache clean --force | |
| COPY . . | |
| # Hugging Face runs Spaces as uid 1000 (the "node" user) | |
| RUN mkdir -p /tmp/mr && chown -R node:node /tmp/mr | |
| USER node | |
| ENV PORT=7860 NODE_ENV=production | |
| EXPOSE 7860 | |
| CMD ["node", "server.js"] | |