Spaces:
Paused
Paused
| FROM buildpack-deps:22.04-curl | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| TZ=Asia/Jakarta \ | |
| USER=eikarna | |
| USER root | |
| RUN useradd -m -u 1000 ${USER} | |
| RUN apt-get -qq update && apt-get -qq install -y \ | |
| software-properties-common > /dev/null 2>&1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN add-apt-repository ppa:xtradeb/apps -y | |
| # Install dependencies for Puppeteer and Chromium | |
| # We use chromium instead of chrome since it's lighter. | |
| RUN apt-get -qq update && apt-get -qq install -y \ | |
| bash \ | |
| unzip \ | |
| git \ | |
| git-lfs \ | |
| curl \ | |
| sudo \ | |
| wget \ | |
| ffmpeg \ | |
| psmisc \ | |
| make \ | |
| chromium \ | |
| libnss3 \ | |
| libatk1.0-0 \ | |
| libatk-bridge2.0-0 \ | |
| libcups2 \ | |
| libdrm2 \ | |
| libxkbcommon0 \ | |
| libx11-xcb1 \ | |
| libxcb-dri3-0 \ | |
| libxcomposite1 \ | |
| libxdamage1 \ | |
| libxfixes3 \ | |
| libxrandr2 \ | |
| libgbm1 \ | |
| libasound2 \ | |
| libpango-1.0-0 \ | |
| libcairo2 \ | |
| libgdk-pixbuf2.0-0 > /dev/null 2>&1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Node.js and proxy with quiet flags | |
| RUN curl -sL https://deb.nodesource.com/setup_22.x | sudo -E bash - > /dev/null 2>&1 && \ | |
| apt-get -qq install -y nodejs > /dev/null 2>&1 && \ | |
| npm install -g configurable-http-proxy --silent | |
| # Set the working directory | |
| WORKDIR /app | |
| # Install pnpm | |
| RUN npm install -g pnpm | |
| # Copy package manager files | |
| COPY package.json pnpm-lock.yaml ./ | |
| # Install dependencies | |
| RUN pnpm install | |
| # Copy the rest of the application code | |
| COPY . . | |
| USER ${USER} | |
| # Expose the port the app runs on. Hugging Face will use this port. | |
| EXPOSE 7860 | |
| # Set the command to start the app | |
| # The executablePath in index.js is set to '/usr/bin/chromium', which is where the package installs it. | |
| CMD ["node", "index.js"] | |