Download Dockerfile from TwanAPI/388890: direct link, hf CLI and curl.
- Browser
- Download file 840 Bytes
-
https://huggingface.co/spaces/TwanAPI/388890/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/TwanAPI/388890/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/TwanAPI/388890/resolve/main/Dockerfile
840 Bytes
| FROM node:22 | |
| USER root | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| sudo \ | |
| build-essential \ | |
| python3 \ | |
| python3-pip \ | |
| pkg-config \ | |
| libssl-dev \ | |
| libcairo2-dev \ | |
| libpango1.0-dev \ | |
| libjpeg-dev \ | |
| libgif-dev \ | |
| librsvg2-dev \ | |
| libsqlite3-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN pip3 install uvicorn fastapi --break-system-packages | |
| # cho node dùng sudo không password | |
| RUN echo "node ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | |
| WORKDIR /home/node/app | |
| COPY start.sh /start.sh | |
| RUN chmod +x /start.sh | |
| RUN chown node:node /start.sh /home/node/app | |
| USER node | |
| EXPOSE 8080 | |
| CMD sh -c '/start.sh & \ | |
| echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf >/dev/null 2>&1; \ | |
| echo "nameserver 1.0.0.1" | sudo tee -a /etc/resolv.conf >/dev/null 2>&1; \ | |
| uvicorn app:app --host 0.0.0.0 --port 7860' | |