Download Dockerfile from ArashiCode/puppeter-playground: direct link, hf CLI and curl.
- Browser
- Download file 1.86 kB
-
https://huggingface.co/spaces/ArashiCode/puppeter-playground/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ArashiCode/puppeter-playground/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ArashiCode/puppeter-playground/resolve/main/Dockerfile
1.86 kB
| # Menggunakan image Ubuntu Focal sebagai base image | |
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED 1 | |
| # Expose the port that the server will run on | |
| EXPOSE 7860 | |
| # Update the package list dan upgrade existing packages | |
| RUN apt update && apt upgrade -y | |
| # Install required packages | |
| RUN apt install -y curl | |
| # install py | |
| RUN apt-get install -y curl neofetch ffmpeg \ | |
| libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libasound2 libpangocairo-1.0-0 libxss1 libgtk-3-0 imagemagick \ | |
| python3 python3-pip python3-venv build-essential libvips libvips-dev libjpeg-dev libpng-dev | |
| RUN pip install gradio_client | |
| # Add NodeSource APT repository for Node 18.x | |
| RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - | |
| # CODE SERVER | |
| RUN curl -fsSL https://code-server.dev/install.sh | sh | |
| # Install Node.js and npm | |
| RUN apt install -y nodejs | |
| # Install Neofetch | |
| RUN apt install -y neofetch | |
| # Install FFmpeg dan dependencies lainnya | |
| RUN apt install -y ffmpeg gnupg ca-certificates build-essential software-properties-common chromium-browser | |
| # Install additional dependencies for Puppeteer | |
| RUN apt --yes install git libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libasound2 libpangocairo-1.0-0 libxss1 libgtk-3-0 | |
| # Install ImageMagick | |
| RUN apt install -y imagemagick | |
| # Create a non-root user named Nex and switch to it | |
| RUN useradd -m -u 1000 Nex | |
| USER Nex | |
| # Set environment variables for the user | |
| ENV HOME=/home/Nex \ | |
| PATH=/home/Nex/.local/bin:$PATH | |
| # Set the working directory | |
| WORKDIR $HOME/app | |
| # Copy package.json and package-lock.json files and install dependencies | |
| COPY --chown=Nex package*.json . | |
| RUN npm install | |
| # Copy the rest of the application code | |
| COPY --chown=Nex . . | |
| # Start the application | |
| CMD ["code-server", ".", "--bind-addr", "0.0.0.0:7860", "--auth", "none"] |