Download Dockerfile from Nand0ZZ/NodeJS: direct link, hf CLI and curl.
- Browser
- Download file 1.38 kB
-
https://huggingface.co/spaces/Nand0ZZ/NodeJS/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Nand0ZZ/NodeJS/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Nand0ZZ/NodeJS/resolve/main/Dockerfile
1.38 kB
| # ----------------------------- | |
| # Base image | |
| # ----------------------------- | |
| FROM node:18-bullseye | |
| # ----------------------------- | |
| # Install system dependencies | |
| # Required for: sharp, tesseract, pdf parsing | |
| # ----------------------------- | |
| RUN apt-get update && apt-get install -y \ | |
| tesseract-ocr \ | |
| libtesseract-dev \ | |
| libleptonica-dev \ | |
| libvips \ | |
| poppler-utils \ | |
| ghostscript \ | |
| build-essential \ | |
| python3 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ----------------------------- | |
| # Set working directory | |
| # ----------------------------- | |
| WORKDIR /app | |
| # ----------------------------- | |
| # Copy package files | |
| # ----------------------------- | |
| COPY package*.json ./ | |
| # ----------------------------- | |
| # Install dependencies | |
| # ----------------------------- | |
| RUN npm install --production | |
| # ----------------------------- | |
| # Copy rest of the source | |
| # ----------------------------- | |
| COPY . . | |
| # ----------------------------- | |
| # Create uploads directory | |
| # ----------------------------- | |
| RUN mkdir -p uploads | |
| # ----------------------------- | |
| # Hugging Face Spaces port | |
| # ----------------------------- | |
| EXPOSE 7860 | |
| # ----------------------------- | |
| # Environment variables | |
| # ----------------------------- | |
| ENV NODE_ENV=production | |
| ENV PORT=7860 | |
| # ----------------------------- | |
| # Start your app | |
| # IMPORTANT: entry file is room.js | |
| # ----------------------------- | |
| CMD ["node", "room.js"] | |